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
dadf16b0
Commit
dadf16b0
authored
Nov 30, 2019
by
nilu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
global HT screens
parent
d30363fd
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
195 additions
and
33 deletions
+195
-33
app.routing.ts
frontend/angular/src/app/app.routing.ts
+30
-0
edit-message-template.component.html
...dit-message-template/edit-message-template.component.html
+1
-1
edit-message-template.component.ts
.../edit-message-template/edit-message-template.component.ts
+39
-5
edit-workflow-template.component.html
...t-workflow-template/edit-workflow-template.component.html
+2
-2
edit-workflow-template.component.ts
...dit-workflow-template/edit-workflow-template.component.ts
+39
-7
list-message-template.component.html
...ist-message-template/list-message-template.component.html
+6
-6
list-message-template.component.ts
.../list-message-template/list-message-template.component.ts
+34
-3
list-work-flows.component.html
...min-portal/list-work-flows/list-work-flows.component.html
+6
-6
list-work-flows.component.ts
...admin-portal/list-work-flows/list-work-flows.component.ts
+38
-3
No files found.
frontend/angular/src/app/app.routing.ts
View file @
dadf16b0
...
...
@@ -44,6 +44,36 @@ export const routes: Routes = [
canActivate
:
[
AuthGuard
],
component
:
IframePageComponent
,
runGuardsAndResolvers
:
'always'
},
{
path
:
'list-message-templates/:global'
,
component
:
ListMessageTemplateComponent
,
canActivate
:
[
AuthGuard
]
},
{
path
:
'edit-message-template/:global'
,
component
:
EditMessageTemplateComponent
,
canActivate
:
[
AuthGuard
]
},
{
path
:
'edit-message-template/:global/:id'
,
component
:
EditMessageTemplateComponent
,
canActivate
:
[
AuthGuard
]
},
{
path
:
'list-workflow-templates/:global'
,
component
:
ListWorkFlowsComponent
,
canActivate
:
[
AuthGuard
]
},
{
path
:
'edit-workflow-template/:global'
,
component
:
EditWorkflowTemplateComponent
,
canActivate
:
[
AuthGuard
]
},
{
path
:
'edit-workflow-template/:global/:id'
,
component
:
EditWorkflowTemplateComponent
,
canActivate
:
[
AuthGuard
]
}
]
},
...
...
frontend/angular/src/app/components/admin-portal/edit-message-template/edit-message-template.component.html
View file @
dadf16b0
...
...
@@ -6,7 +6,7 @@
<div
class=
"ui-g ui-fluid"
*
ngIf=
"!objectID"
>
<div
class=
"ui-g-12"
>
<div
class=
"page-title page-title-with-arrow"
>
<a
[
routerLink
]="['/
admin
/
list-message-templates
']"
class=
"arrow-btn-blue ml-0"
<a
[
routerLink
]="[
isGlobalHT
?
'/
list-message-templates
/
global
'
:
'/
admin
/
list-message-templates
']"
class=
"arrow-btn-blue ml-0"
*
ngIf=
"!objectID"
>
<img
src=
"assets/images/arrow-left-prev_blue.svg"
>
</a>
...
...
frontend/angular/src/app/components/admin-portal/edit-message-template/edit-message-template.component.ts
View file @
dadf16b0
...
...
@@ -45,6 +45,7 @@ export class EditMessageTemplateComponent extends BaseComponent implements OnIni
options
=
{
minimumResultsForSearch
:
Infinity
};
showLoader
=
false
;
editMode
=
false
;
isGlobalHT
=
false
;
constructor
(
private
router
:
Router
,
...
...
@@ -68,7 +69,16 @@ export class EditMessageTemplateComponent extends BaseComponent implements OnIni
this
.
utilsService
.
resetCounter
();
this
.
getPlaceholderOptions
();
if
(
this
.
adminPortalLayoutService
.
userData
)
{
this
.
subscriptions
.
push
(
this
.
activatedRoute
.
params
.
subscribe
(
(
params
:
Params
)
=>
{
if
((
params
.
global
&&
params
.
global
===
'global'
))
{
this
.
isGlobalHT
=
true
;
}
}
));
if
(
this
.
adminPortalLayoutService
.
userData
||
this
.
isGlobalHT
)
{
this
.
initComponent
();
}
else
{
this
.
subscriptions
.
push
(
this
.
adminPortalLayoutService
.
userDataUpdated
.
first
()
...
...
@@ -94,7 +104,10 @@ export class EditMessageTemplateComponent extends BaseComponent implements OnIni
* First condition identifies if the template is being created from workflow template
*/
if
(
this
.
templateCreationFromWorkflow
())
{
if
(
!
this
.
isGlobalHT
)
{
this
.
messageTemplate
.
HiringTeam
=
this
.
adminPortalLayoutService
.
getHiringTeamID
().
ObjectID
;
}
if
(
this
.
messageTemplateTypes
)
{
this
.
messageTemplate
.
TemplateType
=
this
.
messageTemplateTypes
[
0
];
...
...
@@ -115,7 +128,7 @@ export class EditMessageTemplateComponent extends BaseComponent implements OnIni
/**
* Third condition identifies if the template is being created within this component
*/
this
.
messageTemplate
.
HiringTeam
=
this
.
adminPortalLayoutService
.
getHiringTeamID
().
ObjectID
;
this
.
messageTemplate
.
HiringTeam
=
!
this
.
isGlobalHT
?
this
.
adminPortalLayoutService
.
getHiringTeamID
().
ObjectID
:
null
;
if
(
this
.
messageTemplateTypes
)
{
this
.
messageTemplate
.
TemplateType
=
this
.
messageTemplateTypes
[
0
];
...
...
@@ -142,6 +155,19 @@ export class EditMessageTemplateComponent extends BaseComponent implements OnIni
* if the template is in edit mode
*/
showSaveBtn
():
boolean
{
if
(
this
.
templateCreationFromWorkflow
())
{
return
true
;
}
if
(
this
.
templateUpdateFromWorkflow
())
{
return
false
;
}
if
(
this
.
isGlobalHT
)
{
return
true
;
}
if
(
!!
this
.
messageTemplate
&&
!!
this
.
messageTemplate
.
ObjectID
)
{
return
this
.
messageTemplate
.
HiringTeam
===
this
.
adminPortalLayoutService
.
getHiringTeamID
().
ObjectID
?
(
this
.
templateCreationFromWorkflow
()
?
true
:
!
this
.
templateUpdateFromWorkflow
())
:
false
;
...
...
@@ -150,6 +176,10 @@ export class EditMessageTemplateComponent extends BaseComponent implements OnIni
showSaveIntoAllTemplates
():
boolean
{
if
(
this
.
isGlobalHT
&&
this
.
templateUpdateFromWorkflow
())
{
return
true
;
}
if
(
this
.
templateCreationFromWorkflow
())
{
return
false
;
}
...
...
@@ -160,7 +190,11 @@ export class EditMessageTemplateComponent extends BaseComponent implements OnIni
}
showSaveCopyBtn
():
boolean
{
if
(
this
.
messageTemplate
&&
this
.
messageTemplate
.
ObjectID
)
{
if
(
this
.
isGlobalHT
&&
this
.
templateUpdateFromWorkflow
())
{
return
true
;
}
if
(
!
this
.
isGlobalHT
&&
this
.
messageTemplate
&&
this
.
messageTemplate
.
ObjectID
)
{
return
this
.
messageTemplate
.
HiringTeam
===
null
;
}
...
...
@@ -407,7 +441,7 @@ export class EditMessageTemplateComponent extends BaseComponent implements OnIni
if
(
this
.
templateCreationFromWorkflow
()
||
this
.
templateUpdateFromWorkflow
())
{
this
.
closeModal
.
emit
(
-
1
);
}
else
{
this
.
router
.
navigate
([
'/admin/list-message-templates'
]);
this
.
router
.
navigate
([
this
.
isGlobalHT
?
'/list-message-templates/global'
:
'/admin/list-message-templates'
]);
}
}
...
...
@@ -439,7 +473,7 @@ export class EditMessageTemplateComponent extends BaseComponent implements OnIni
}
else
if
(
this
.
templateUpdateFromWorkflow
())
{
this
.
closeModal
.
emit
(
this
.
messageTemplate
.
ObjectID
);
}
else
{
this
.
router
.
navigate
([
'/admin/list-message-templates'
]);
this
.
router
.
navigate
([
this
.
isGlobalHT
?
'/list-message-templates/global'
:
'/admin/list-message-templates'
]);
}
},
error
=>
{
...
...
frontend/angular/src/app/components/admin-portal/edit-workflow-template/edit-workflow-template.component.html
View file @
dadf16b0
...
...
@@ -6,7 +6,7 @@
<div
class=
"ui-g ui-fluid"
>
<div
class=
"ui-g-12"
>
<div
class=
"page-title page-title-with-arrow mb-0"
>
<a
[
routerLink
]="['/
admin
/
list-workflow-templates
']"
class=
"arrow-btn-blue ml-0"
>
<a
[
routerLink
]="[
isGlobalHT
?
'/
list-workflow-templates
/
global
'
:
'/
admin
/
list-workflow-templates
']"
class=
"arrow-btn-blue ml-0"
>
<img
src=
"assets/images/arrow-left-prev_blue.svg"
>
</a>
{{editMode ? "Edit" : "Add"}} Workflow Template
...
...
@@ -238,7 +238,7 @@
<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-workflow-templates
"
[
routerLink
]="
isGlobalHT
?
'/
list-workflow-templates
/
global
'
:
'/
admin
/
list-workflow-templates
'
"
type=
"button"
value=
"Cancel"
>
Cancel
</button>
...
...
frontend/angular/src/app/components/admin-portal/edit-workflow-template/edit-workflow-template.component.ts
View file @
dadf16b0
...
...
@@ -55,6 +55,7 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
draggingId
=
null
;
selectedTemplateID
=
null
;
selectedMessageTemplate
=
null
;
// object id of type WorkflowMessageModel
isGlobalHT
=
false
;
constructor
(
private
router
:
Router
,
...
...
@@ -72,8 +73,17 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
ngOnInit
():
void
{
window
.
scrollTo
(
0
,
0
);
this
.
subscriptions
.
push
(
this
.
activatedRoute
.
params
.
subscribe
(
(
params
:
Params
)
=>
{
if
((
params
.
global
&&
params
.
global
===
'global'
))
{
this
.
isGlobalHT
=
true
;
}
}
));
this
.
showLoader
=
true
;
if
(
this
.
adminPortalLayoutService
.
userData
)
{
if
(
this
.
adminPortalLayoutService
.
userData
||
this
.
isGlobalHT
)
{
this
.
initComponent
();
}
else
{
this
.
subscriptions
.
push
(
this
.
adminPortalLayoutService
.
userDataUpdated
...
...
@@ -111,10 +121,9 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
});
// Diversity is shown only is enabled by selected hiring team
if
(
!
this
.
adminPortalLayoutService
.
getHiringTeamID
().
HasDiversity
)
{
if
(
!
this
.
isGlobalHT
&&
!
this
.
adminPortalLayoutService
.
getHiringTeamID
().
HasDiversity
)
{
this
.
stepTypeOptions
=
this
.
stepTypeOptions
.
filter
(
type
=>
type
.
Value
!==
'DIVERSITY'
);
}
this
.
responseActions
=
response
[
2
];
this
.
applicantSources
=
response
[
3
];
...
...
@@ -158,7 +167,7 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
this
.
workflow
.
JobOutlineButtonText
=
'Continue'
;
this
.
workflow
.
CaptureCV
=
true
;
this
.
workflow
.
CaptureCL
=
true
;
this
.
workflow
.
HiringTeam
=
this
.
adminPortalLayoutService
.
getHiringTeamID
().
ObjectID
;
this
.
workflow
.
HiringTeam
=
!
this
.
isGlobalHT
?
this
.
adminPortalLayoutService
.
getHiringTeamID
().
ObjectID
:
null
;
}
/**
...
...
@@ -211,13 +220,13 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
}
showSaveBtn
():
boolean
{
return
this
.
workflow
&&
this
.
workflow
.
ObjectID
?
return
this
.
isGlobalHT
||
(
this
.
workflow
&&
this
.
workflow
.
ObjectID
?
(
this
.
workflow
.
HiringTeam
===
this
.
adminPortalLayoutService
.
getHiringTeamID
().
ObjectID
||
!
this
.
editMode
)
:
false
;
!
this
.
editMode
)
:
false
)
;
}
showSaveCopyBtn
():
boolean
{
if
(
this
.
workflow
&&
this
.
workflow
.
ObjectID
)
{
if
(
!
this
.
isGlobalHT
&&
this
.
workflow
&&
this
.
workflow
.
ObjectID
)
{
return
this
.
workflow
.
HiringTeam
===
null
;
}
...
...
@@ -330,6 +339,28 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
OnlyGlobalTemplate
:
true
,
attribsByName
:
'Autocomplete'
};
if
(
this
.
isGlobalHT
)
{
this
.
subscriptions
.
push
(
combineLatest
(
this
.
editWorkflowTemplateService
.
getMessageTemplates
([],
sharedMsgParams
)
)
.
subscribe
(
(
response
:
[
Array
<
MessageTemplateModel
>
])
=>
{
this
.
messageTemplates
=
response
[
0
];
this
.
addNewOptionToMessageTemplate
();
this
.
assignMessageTemplate
();
if
(
callback
)
{
// called when a new message template is created
callback
();
}
},
error
=>
{
this
.
utilsService
.
handleError
(
error
);
}
)
);
}
else
{
const
myMsgParams
=
{
OnlyGlobalTemplate
:
false
,
attribsByName
:
'Autocomplete'
,
...
...
@@ -359,6 +390,7 @@ export class EditWorkflowTemplateComponent extends BaseComponent implements OnIn
)
);
}
}
addNewOptionToMessageTemplate
():
void
{
const
newTemplate
=
new
MessageTemplateModel
();
...
...
frontend/angular/src/app/components/admin-portal/list-message-template/list-message-template.component.html
View file @
dadf16b0
...
...
@@ -4,7 +4,7 @@
<div
class=
"jobs-list-shorting"
>
<div
class=
"ui-g-3 d-job-title all-jobs-title"
>
Messages
</div>
<div
class=
"ui-g-4"
>
<a
routerLink=
"/admin/edit-message-template
"
class=
"add-more-btn"
>
Add Message Template
</a>
<a
(
click
)="
onNewTemplate
()
"
class=
"add-more-btn"
>
Add Message Template
</a>
</div>
<div
class=
"listing-dropdown"
>
<span
class=
"order-label mr-0"
>
order by
</span>
...
...
@@ -16,9 +16,9 @@
</div>
<div
class=
"ui-g form-group pt-0"
>
<div
class=
"ui-g-12 ui-md-12 pt-0"
>
<h3>
My Templates
</h3>
<hr/>
<div
class=
"main-client-list"
>
<h3
*
ngIf=
"!isGlobalHT"
>
My Templates
</h3>
<hr
*
ngIf=
"!isGlobalHT"
/>
<div
*
ngIf=
"!isGlobalHT"
class=
"main-client-list"
>
<div
class=
"template-list"
*
ngFor=
"let message of myTemplates"
id=
"{{message.ObjectID}}"
>
<div
class=
"template-row"
>
<div
class=
"job-template-left w-80 job-template-cl1 no-border"
>
...
...
@@ -48,8 +48,8 @@
</div>
</div>
</div>
<h3>
Shared Templates
</h3>
<hr/>
<h3
*
ngIf=
"!isGlobalHT"
>
Shared Templates
</h3>
<hr
*
ngIf=
"!isGlobalHT"
/>
<div
class=
"main-client-list"
>
<div
class=
"template-list"
*
ngFor=
"let message of sharedTemplates"
id=
"{{message.ObjectID}}"
>
<div
class=
"template-row"
>
...
...
frontend/angular/src/app/components/admin-portal/list-message-template/list-message-template.component.ts
View file @
dadf16b0
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
ActivatedRoute
,
Router
}
from
'@angular/router'
;
import
{
ActivatedRoute
,
Params
,
Router
}
from
'@angular/router'
;
import
{
combineLatest
}
from
'rxjs/observable/combineLatest'
;
import
{
Subscription
}
from
'rxjs/Subscription'
;
import
{
AppService
}
from
'../../../app.service'
;
...
...
@@ -23,6 +23,7 @@ export class ListMessageTemplateComponent extends BaseComponent implements OnIni
sortOptions
:
Array
<
SorterModel
>
;
showLoader
=
false
;
processing
=
false
;
isGlobalHT
=
false
;
constructor
(
private
router
:
Router
,
...
...
@@ -36,13 +37,22 @@ export class ListMessageTemplateComponent extends BaseComponent implements OnIni
}
ngOnInit
():
void
{
this
.
subscriptions
.
push
(
this
.
activatedRoute
.
params
.
subscribe
(
(
params
:
Params
)
=>
{
if
((
params
.
global
&&
params
.
global
===
'global'
))
{
this
.
isGlobalHT
=
true
;
}
}
));
this
.
sortOptions
=
[
new
SorterModel
(
'Alphabetical (A-Z)'
,
true
),
new
SorterModel
(
'Alphabetical (Z-A)'
,
false
)
];
this
.
showLoader
=
true
;
if
(
this
.
adminPortalLayoutService
.
userData
)
{
if
(
this
.
adminPortalLayoutService
.
userData
||
this
.
isGlobalHT
)
{
this
.
initComponent
();
}
else
{
this
.
subscriptions
.
push
(
...
...
@@ -59,6 +69,22 @@ export class ListMessageTemplateComponent extends BaseComponent implements OnIni
const
sharedMsgParams
=
{
OnlyGlobalTemplate
:
true
};
if
(
this
.
isGlobalHT
)
{
this
.
subscriptions
.
push
(
combineLatest
(
this
.
appService
.
getSearchListing
(
SERVICES
.
MESSAGE_TEMPLATES
,
'All'
,
sharedMsgParams
,
[],
SEARCH
.
MESSAGE_TEMPLATE
)
)
.
subscribe
(
(
response
:
[
Array
<
MessageTemplateModel
>
])
=>
{
this
.
sharedTemplates
=
response
[
0
];
this
.
sortSpecificTemplate
(
'sharedTemplates'
);
this
.
showLoader
=
false
;
}
)
);
}
else
{
const
myMsgParams
=
{
OnlyGlobalTemplate
:
false
,
HiringTeam
:
this
.
adminPortalLayoutService
.
getHiringTeamID
().
ObjectID
...
...
@@ -82,6 +108,7 @@ export class ListMessageTemplateComponent extends BaseComponent implements OnIni
)
);
}
}
sortSpecificTemplate
(
arrayName
:
string
):
void
{
this
[
arrayName
]
=
this
.
utilsService
.
sort
(
this
[
arrayName
],
...
...
@@ -103,6 +130,10 @@ export class ListMessageTemplateComponent extends BaseComponent implements OnIni
}
onRowSelect
(
data
:
MessageTemplateModel
):
void
{
this
.
router
.
navigate
([
'/admin/edit-message-template'
,
data
.
ObjectID
]);
this
.
router
.
navigate
([
this
.
isGlobalHT
?
'/edit-message-template/global'
:
'/admin/edit-message-template'
,
data
.
ObjectID
]);
}
onNewTemplate
():
void
{
this
.
router
.
navigate
([
this
.
isGlobalHT
?
'/edit-message-template/global'
:
'/admin/edit-message-template'
]);
}
}
frontend/angular/src/app/components/admin-portal/list-work-flows/list-work-flows.component.html
View file @
dadf16b0
...
...
@@ -4,7 +4,7 @@
<div
class=
"jobs-list-shorting"
>
<div
class=
"ui-g-3 d-job-title all-jobs-title"
>
Workflows
</div>
<div
class=
"ui-g-4"
>
<a
routerLink=
"/admin/edit-workflow-template
"
class=
"add-more-btn"
>
Add Workflow Template
</a>
<a
(
click
)="
onNewTemplate
()
"
class=
"add-more-btn"
>
Add Workflow Template
</a>
</div>
<div
class=
"listing-dropdown"
>
<span
class=
"order-label mr-0"
>
order by
</span>
...
...
@@ -16,9 +16,9 @@
</div>
<div
class=
"ui-g form-group pt-0"
>
<div
class=
"ui-g-12 ui-md-12 pt-0"
>
<h3>
My Templates
</h3>
<hr/>
<div
class=
"main-client-list"
>
<h3
*
ngIf=
"!isGlobalHT"
>
My Templates
</h3>
<hr
*
ngIf=
"!isGlobalHT"
/>
<div
*
ngIf=
"!isGlobalHT"
class=
"main-client-list"
>
<div
class=
"template-list"
*
ngFor=
"let workflow of myTemplates"
id=
"{{workflow.ObjectID}}"
>
<div
class=
"template-row"
>
<div
class=
"job-template-left w-80 job-template-cl1 no-border"
>
...
...
@@ -48,8 +48,8 @@
</div>
</div>
</div>
<h3>
Shared Templates
</h3>
<hr/>
<h3
*
ngIf=
"!isGlobalHT"
>
Shared Templates
</h3>
<hr
*
ngIf=
"!isGlobalHT"
/>
<div
class=
"main-client-list"
>
<div
class=
"template-list"
*
ngFor=
"let workflow of sharedTemplates"
id=
"{{workflow.ObjectID}}"
>
<div
class=
"template-row"
>
...
...
frontend/angular/src/app/components/admin-portal/list-work-flows/list-work-flows.component.ts
View file @
dadf16b0
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Router
}
from
'@angular/router'
;
import
{
Router
,
Params
,
ActivatedRoute
}
from
'@angular/router'
;
import
{
combineLatest
}
from
'rxjs/observable/combineLatest'
;
import
{
Subscription
}
from
'rxjs/Subscription'
;
import
{
AppService
}
from
'../../../app.service'
;
...
...
@@ -21,9 +21,11 @@ export class ListWorkFlowsComponent extends BaseComponent implements OnInit {
sharedTemplates
:
Array
<
WorkflowTemplateModel
>
=
[];
sortOptions
:
Array
<
SorterModel
>
;
showLoader
=
false
;
isGlobalHT
=
false
;
constructor
(
private
router
:
Router
,
private
activatedRoute
:
ActivatedRoute
,
private
utilsService
:
UtilsService
,
private
appService
:
AppService
,
private
adminPortalLayoutService
:
AdminPortalLayoutService
...
...
@@ -32,13 +34,22 @@ export class ListWorkFlowsComponent extends BaseComponent implements OnInit {
}
ngOnInit
():
void
{
this
.
subscriptions
.
push
(
this
.
activatedRoute
.
params
.
subscribe
(
(
params
:
Params
)
=>
{
if
((
params
.
global
&&
params
.
global
===
'global'
))
{
this
.
isGlobalHT
=
true
;
}
}
));
this
.
sortOptions
=
[
new
SorterModel
(
'Alphabetical (A-Z)'
,
true
),
new
SorterModel
(
'Alphabetical (Z-A)'
,
false
)
];
this
.
showLoader
=
true
;
if
(
this
.
adminPortalLayoutService
.
userData
)
{
if
(
this
.
adminPortalLayoutService
.
userData
||
this
.
isGlobalHT
)
{
this
.
initComponent
();
}
else
{
this
.
subscriptions
.
push
(
...
...
@@ -55,6 +66,25 @@ export class ListWorkFlowsComponent extends BaseComponent implements OnInit {
const
sharedParams
=
{
OnlyGlobalTemplates
:
true
};
if
(
this
,
this
.
isGlobalHT
)
{
this
.
subscriptions
.
push
(
combineLatest
(
this
.
appService
.
getSearchListing
(
SERVICES
.
WORKFLOW_TEMPLATES
,
'All'
,
sharedParams
,
[],
SEARCH
.
WORKFLOW_TEMPLATE
)
)
.
subscribe
(
(
response
:
[
Array
<
WorkflowTemplateModel
>
])
=>
{
this
.
sharedTemplates
=
response
[
0
];
this
.
sortSpecificTemplate
(
'sharedTemplates'
);
this
.
showLoader
=
false
;
},
error
=>
{
this
.
showLoader
=
false
;
this
.
utilsService
.
handleError
(
error
);
}
)
);
}
else
{
const
myParams
=
{
OnlyGlobalTemplates
:
false
,
HiringTeam
:
this
.
adminPortalLayoutService
.
getHiringTeamID
().
ObjectID
...
...
@@ -82,6 +112,7 @@ export class ListWorkFlowsComponent extends BaseComponent implements OnInit {
)
);
}
}
sortSpecificTemplate
(
arrayName
:
string
):
void
{
this
[
arrayName
]
=
this
.
utilsService
.
sort
(
this
[
arrayName
],
...
...
@@ -103,6 +134,10 @@ export class ListWorkFlowsComponent extends BaseComponent implements OnInit {
}
onRowSelect
(
data
:
WorkflowTemplateModel
):
void
{
this
.
router
.
navigate
([
'/admin/edit-workflow-template'
,
data
.
ObjectID
]);
this
.
router
.
navigate
([
this
.
isGlobalHT
?
'/edit-workflow-template/global'
:
'/admin/edit-workflow-template'
,
data
.
ObjectID
]);
}
onNewTemplate
():
void
{
this
.
router
.
navigate
([
this
.
isGlobalHT
?
'/edit-workflow-template/global'
:
'/admin/edit-workflow-template'
]);
}
}
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