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
d9c84de3
Commit
d9c84de3
authored
Nov 18, 2019
by
GD-A-150752
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
list-workflow-templates
parent
720edbff
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
83 additions
and
93 deletions
+83
-93
list-message-template.component.scss
...ist-message-template/list-message-template.component.scss
+0
-28
list-message-template.component.ts
.../list-message-template/list-message-template.component.ts
+1
-2
list-work-flows.component.html
...components/list-work-flows/list-work-flows.component.html
+33
-60
list-work-flows.component.ts
...p/components/list-work-flows/list-work-flows.component.ts
+15
-3
custom.scss
frontend/angular/src/assets/css/custom.scss
+34
-0
No files found.
frontend/angular/src/app/components/list-message-template/list-message-template.component.scss
deleted
100644 → 0
View file @
720edbff
.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
;
.messageRow
{
height
:
40px
;
padding
:
15px
;
display
:
flex
;
.templateName
{
width
:
95%
;
align-self
:
center
;
text-overflow
:
ellipsis
;
word-break
:
break-all
;
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 @
d9c84de3
...
...
@@ -11,8 +11,7 @@ import { BaseComponent } from '../base/base.component';
@
Component
({
selector
:
'app-list-message-template'
,
templateUrl
:
'./list-message-template.component.html'
,
styleUrls
:
[
'./list-message-template.component.scss'
]
templateUrl
:
'./list-message-template.component.html'
})
export
class
ListMessageTemplateComponent
extends
BaseComponent
implements
OnInit
{
...
...
frontend/angular/src/app/components/list-work-flows/list-work-flows.component.html
View file @
d9c84de3
...
...
@@ -6,81 +6,54 @@
<a
routerLink=
"/admin/edit-workflow-template"
class=
"add-more-btn"
>
Add Workflow Template
</a>
</div>
</div>
<div
class=
"ui-g-12"
>
<div
class=
"ui-g-12
pt-0 pb-0
"
>
<div
class=
"ui-g-4 pull-right"
>
<div
class=
"ui-g-4"
><label
class=
"order-label"
>
Sort By
</label></div>
<div
class=
"ui-g-8"
>
<p-dropdown
[
options
]="
sortOptions
"
name=
"sort"
[(
ngModel
)]="
sortSelected
"
(
onChange
)="
sortWorkFlowTemplates
()"
optionLabel=
"description"
>
</p-dropdown>
<app-select-2
[
data
]="
sortOptions
"
[
value
]="
sortSelected
"
fieldLabel=
"description"
(
valChange
)="
sortWorkFlowTemplates
($
event
)"
>
</app-select-2>
</div>
</div>
</div>
</div>
<div
class=
"ui-g form-group"
>
<div
class=
"ui-g form-group
pt-0
"
>
<div
class=
"ui-g-12 ui-md-12 pt-0"
>
<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>
<h3>
My Templates
</h3>
<hr/>
<div
*
ngFor=
"let workflow of myTemplates"
class=
"messageTemplate"
>
<div
class=
"messageRow"
>
<div
class=
"templateName"
>
<span
(
click
)="
onRowSelect
(
workflow
)"
>
{{workflow.TemplateName}}
</span>
</div>
<button
pButton
type=
"button"
icon=
"ui-icon-edit"
title=
"Edit"
(
click
)="
onRowSelect
(
workflow
)"
[
disabled
]="
showLoader
"
>
</button>
</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
*
ngIf=
"myTemplates.length === 0"
class=
"messageTemplate"
>
<div
class=
"messageRow"
>
<div
class=
"templateName"
>
<span>
No records found.
</span>
</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>
<h3>
Shared Templates
</h3>
<hr/>
<div
*
ngFor=
"let workflow of sharedTemplates"
class=
"messageTemplate"
>
<div
class=
"messageRow"
>
<div
class=
"templateName"
>
<span
(
click
)="
onRowSelect
(
workflow
)"
>
{{workflow.TemplateName}}
</span>
</div>
<button
pButton
type=
"button"
icon=
"ui-icon-edit"
title=
"Edit"
(
click
)="
onRowSelect
(
workflow
)"
[
disabled
]="
showLoader
"
>
</button>
</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
*
ngIf=
"sharedTemplates.length === 0"
class=
"messageTemplate"
>
<div
class=
"messageRow"
>
<div
class=
"templateName"
>
<span>
No records found.
</span>
</div>
</div>
</div>
...
...
frontend/angular/src/app/components/list-work-flows/list-work-flows.component.ts
View file @
d9c84de3
...
...
@@ -45,6 +45,7 @@ export class ListWorkFlowsComponent extends BaseComponent implements OnInit {
.
subscribe
(
messages
=>
{
this
.
myTemplates
=
messages
;
this
.
sortSpecificTemplate
(
'myTemplates'
);
},
error
=>
{
this
.
showLoader
=
false
;
...
...
@@ -57,6 +58,7 @@ export class ListWorkFlowsComponent extends BaseComponent implements OnInit {
.
subscribe
(
messages
=>
{
this
.
sharedTemplates
=
messages
;
this
.
sortSpecificTemplate
(
'sharedTemplates'
);
},
error
=>
{
this
.
showLoader
=
false
;
...
...
@@ -67,13 +69,23 @@ export class ListWorkFlowsComponent extends BaseComponent implements OnInit {
setTimeout
(()
=>
(
this
.
showLoader
=
false
),
0
);
}
sortWorkFlowTemplates
():
void
{
sortSpecificTemplate
(
arrayName
:
string
):
void
{
this
[
arrayName
]
=
this
.
utilsService
.
sort
(
this
[
arrayName
],
[
'TemplateName'
],
[
this
.
sortOptions
[
0
].
ascending
?
1
:
-
1
],
false
);
}
sortWorkFlowTemplates
(
$event
):
void
{
if
(
!
$event
.
data
[
0
])
{
return
;
}
const
sort
=
$event
.
data
[
0
];
this
.
showLoader
=
true
;
this
.
myTemplates
=
this
.
utilsService
.
sort
(
this
.
myTemplates
,
[
'TemplateName'
],
[
this
.
sortSelected
.
ascending
?
1
:
-
1
],
false
);
[
'TemplateName'
],
[
sort
.
ascending
?
1
:
-
1
],
false
);
this
.
sharedTemplates
=
this
.
utilsService
.
sort
(
this
.
sharedTemplates
,
[
'TemplateName'
],
[
this
.
sortSelected
.
ascending
?
1
:
-
1
],
false
);
[
'TemplateName'
],
[
sort
.
ascending
?
1
:
-
1
],
false
);
this
.
showLoader
=
false
;
}
onRowSelect
(
data
:
WorkflowTemplateModel
):
void
{
...
...
frontend/angular/src/assets/css/custom.scss
View file @
d9c84de3
...
...
@@ -19,3 +19,37 @@
.w-100
{
width
:
100%
!
important
;
}
/* Listing of message and workflow templates */
.messageTemplate
{
background
:
#fff
none
repeat
scroll
0
0
;
display
:
inline-block
;
width
:
100%
;
box-shadow
:
0
2px
3px
0
rgba
(
0
,
0
,
0
,
0
.02
);
margin-bottom
:
10px
;
.messageRow
{
height
:
40px
;
padding
:
15px
;
display
:
flex
;
.templateName
{
width
:
95%
;
align-self
:
center
;
text-overflow
:
ellipsis
;
word-break
:
break-all
;
border-left
:
3px
solid
#03ac66
;
padding-left
:
5px
;
span
{
cursor
:
pointer
;
font-weight
:
bold
;
color
:
#4e5258
;
font-size
:
18px
;
}
}
}
}
/* End listing of message and workflow template styling */
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