Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
PSManagementUI
Project
Project
Details
Activity
Releases
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
hasan.bahjat
PSManagementUI
Commits
3c7b981a
Commit
3c7b981a
authored
Aug 28, 2024
by
hasan khaddour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add project manager and leader change
parent
cdc26eca
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
396 additions
and
43 deletions
+396
-43
info-controll.component.html
...oject-controll/info-controll/info-controll.component.html
+6
-3
info-controll.component.ts
...project-controll/info-controll/info-controll.component.ts
+13
-2
report-controll.component.html
...t-controll/report-controll/report-controll.component.html
+5
-21
track-controll.component.html
...ect-controll/track-controll/track-controll.component.html
+1
-1
change-leader-modal.component.css
...als/change-leader-modal/change-leader-modal.component.css
+0
-0
change-leader-modal.component.html
...ls/change-leader-modal/change-leader-modal.component.html
+36
-0
change-leader-modal.component.ts
...dals/change-leader-modal/change-leader-modal.component.ts
+120
-0
change-manager-modal.component.css
...s/change-manager-modal/change-manager-modal.component.css
+0
-0
change-manager-modal.component.html
.../change-manager-modal/change-manager-modal.component.html
+37
-0
change-manager-modal.component.ts
...ls/change-manager-modal/change-manager-modal.component.ts
+123
-0
project-complete-modal.component.ts
...roject-complete-modal/project-complete-modal.component.ts
+1
-0
project-details.component.html
...ects/pages/project-details/project-details.component.html
+4
-1
project-details.component.ts
...ojects/pages/project-details/project-details.component.ts
+43
-13
project-list.component.html
...p/projects/pages/project-list/project-list.component.html
+1
-0
projects.module.ts
src/app/projects/projects.module.ts
+5
-1
add-employee-track-modal.component.ts
...mployee-track-modal/add-employee-track-modal.component.ts
+1
-1
No files found.
src/app/projects/components/project-controll/info-controll/info-controll.component.html
View file @
3c7b981a
...
...
@@ -14,7 +14,7 @@
<span
class=
"fe fe-credit-card fe-16 text-white"
></span>
</div>
<div
class=
"flex-fill ml-4 fname"
>
<strong>
إدارة
المراحل
</strong><br
/>
<strong>
المراحل
</strong><br
/>
</div>
</div>
</div>
...
...
@@ -64,7 +64,9 @@
</div>
<!-- .row -->
</div>
<div
class=
"col-md-6 col-lg-4"
>
<div
class=
"col-md-6 col-lg-4"
(
click
)="
onChangeManger
()"
>
<div
class=
"card shadow mb-4"
>
<div
class=
"card-body file-list"
>
<div
class=
"d-flex align-items-center"
>
...
...
@@ -78,7 +80,8 @@
</div>
<!-- .card-body -->
</div>
<!-- .card -->
</div>
<div
class=
"col-md-6 col-lg-4"
>
<div
class=
"col-md-6 col-lg-4"
(
click
)="
onChangeLeader
()"
>
<div
class=
"card shadow mb-4"
>
<div
class=
"card-body file-list"
>
<div
class=
"d-flex align-items-center"
>
...
...
src/app/projects/components/project-controll/info-controll/info-controll.component.ts
View file @
3c7b981a
import
{
Component
,
In
put
}
from
'@angular/core'
;
import
{
Component
,
EventEmitter
,
Input
,
Out
put
}
from
'@angular/core'
;
import
{
Project
}
from
'../../../models/responses/project'
;
@
Component
({
...
...
@@ -7,5 +7,16 @@ import { Project } from '../../../models/responses/project';
styleUrl
:
'./info-controll.component.css'
})
export
class
InfoControllComponent
{
@
Input
()
project
:
Project
@
Input
()
project
:
Project
@
Output
()
changeLeader
=
new
EventEmitter
<
void
>
()
@
Output
()
changeManager
=
new
EventEmitter
<
void
>
()
onChangeManger
(){
this
.
changeManager
.
emit
();
}
onChangeLeader
(){
this
.
changeLeader
.
emit
();
}
}
src/app/projects/components/project-controll/report-controll/report-controll.component.html
View file @
3c7b981a
...
...
@@ -7,7 +7,7 @@
class=
"col-md-6 col-lg-4"
[
routerLink
]="['/
reports
/
definition
/',
project
.
id
]"
>
<div
class=
"card shadow mb-4"
>
<div
class=
"card shadow mb-4"
>
<div
class=
"card-body file-list"
>
<div
class=
"d-flex align-items-center"
>
<div
class=
"circle circle-md bg-secondary"
>
...
...
@@ -46,7 +46,7 @@
class=
"col-md-6 col-lg-4"
>
<div
class=
"card shadow mb-4"
>
<div
class=
"card shadow mb-4"
[
routerLink
]="['/
reports
/
completion
',
project
.
id
]"
>
<div
class=
"card-body file-list"
>
<div
class=
"d-flex align-items-center"
>
<div
class=
"circle circle-md bg-secondary"
>
...
...
@@ -63,21 +63,7 @@
</div>
<!-- .row -->
</div>
<div
class=
"col-md-6 col-lg-4"
>
<div
class=
"card shadow mb-4"
>
<div
class=
"card-body file-list"
>
<div
class=
"d-flex align-items-center"
>
<div
class=
"circle circle-md bg-secondary"
>
<span
class=
"fe fe-map fe-16 text-white"
></span>
</div>
<div
class=
"flex-fill ml-4 fname"
>
<strong>
بطاقة الانشغالية
</strong><br
/>
</div>
</div>
</div>
<!-- .card-body -->
</div>
<!-- .card -->
</div>
<div
class=
"col-md-6 col-lg-4"
>
<div
class=
"col-md-6 col-lg-4"
[
routerLink
]="['/
rerports
/
history
',
project
.
id
]"
>
<div
class=
"card shadow mb-4"
>
<div
class=
"card-body file-list"
>
<div
class=
"d-flex align-items-center"
>
...
...
@@ -85,12 +71,10 @@
<span
class=
"fe fe-map fe-16 text-white"
></span>
</div>
<div
class=
"flex-fill ml-4 fname"
>
<strong>
بطاقة متابعة المراحل
</strong><br
/>
<strong>
بطاقة تاريخ متابعة
</strong><br
/>
</div>
</div>
</div>
<!-- .card-body -->
</div>
<!-- .card -->
</div>
\ No newline at end of file
</div>
\ No newline at end of file
src/app/projects/components/project-controll/track-controll/track-controll.component.html
View file @
3c7b981a
...
...
@@ -18,7 +18,7 @@
</div>
<!-- .card-body -->
</div>
<!-- .card -->
</div>
<div
class=
"col-md-6 col-lg-4"
(
click
)="
onComplete
()"
>
<div
class=
"col-md-6 col-lg-4"
*
ngIf=
"project.currentState.toLowerCase()=='inplan'"
(
click
)="
onComplete
()"
>
<div
class=
"card shadow mb-4"
>
<div
class=
"card-body file-list"
>
<div
class=
"d-flex align-items-center"
>
...
...
src/app/projects/components/projectModals/change-leader-modal/change-leader-modal.component.css
0 → 100644
View file @
3c7b981a
src/app/projects/components/projectModals/change-leader-modal/change-leader-modal.component.html
0 → 100644
View file @
3c7b981a
<div
class=
"modal-header"
>
<h5
class=
"modal-title"
id=
"addEmployeeTrackModalLable"
>
تغيير مدير المشروع
</h5>
<button
type=
"button"
class=
"mr-4 ml-4 btn-close"
(
click
)="
onClose
()"
></button>
</div>
<div
class=
"modal-body"
>
<form
[
formGroup
]="
employeeForm
"
(
ngSubmit
)="
onSubmit
()"
>
<div
class=
"row "
>
<div
class=
"mb-3 col-8 offset-2 "
>
<label
for=
"hiastIdM"
class=
"form-label"
>
الرقم الذاتي لرئيس فريق العمل للجديد
</label>
<input
id=
"hiastIdM"
formControlName=
"employee"
class=
"form-control"
[
ngbTypeahead
]="
searchEmployees
"
[
inputFormatter
]="
employeeFormatter
"
[
resultFormatter
]="
employeeFormatter
"
(
selectItem
)="
onStepSelected
($
event
.
item
)"
>
</div>
</div>
<div
class=
"row "
>
<div
class=
"mb-3 col-8 offset-2 "
>
<label
class=
"form-label"
>
رئيس فريق العمل القديم
</label>
<label
class=
"form-label"
>
{{project.teamLeader.personalInfo | fullname }}
</label>
</div>
</div>
<button
type=
"submit"
class=
"btn mr-4 ml-4 btn-primary"
[
disabled
]="!
employeeForm
.
valid
"
>
تغيير
</button>
<button
data-bs-dismiss=
"modal"
aria-label=
"Close"
class=
" mr-4 ml-4 btn btn-primary"
>
إلغاء
</button>
</form>
</div>
src/app/projects/components/projectModals/change-leader-modal/change-leader-modal.component.ts
0 → 100644
View file @
3c7b981a
import
{
Component
,
Input
}
from
'@angular/core'
;
import
{
FormGroup
,
FormBuilder
}
from
'@angular/forms'
;
import
{
NgbActiveModal
}
from
'@ng-bootstrap/ng-bootstrap'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
Observable
,
debounceTime
,
distinctUntilChanged
,
map
}
from
'rxjs'
;
import
{
Employee
}
from
'../../../../employees/models/responses/employee'
;
import
{
EmployeesService
}
from
'../../../../employees/services/employees.service'
;
import
{
ChangeProjectManagerRequest
}
from
'../../../models/requests/project-requests/ChangeProjectManagerRequest'
;
import
{
Project
}
from
'../../../models/responses/project'
;
import
{
ProjectService
}
from
'../../../services/project.service'
;
import
{
ChangeProjectTeamLeaderRequest
}
from
'../../../models/requests/project-requests/ChangeProjectTeamLeaderRequest'
;
@
Component
({
selector
:
'change-leader-modal'
,
templateUrl
:
'./change-leader-modal.component.html'
,
styleUrl
:
'./change-leader-modal.component.css'
})
export
class
ChangeLeaderModalComponent
{
@
Input
()
project
:
Project
employees
:
Employee
[]
request
:
ChangeProjectTeamLeaderRequest
employeeForm
:
FormGroup
;
constructor
(
private
fb
:
FormBuilder
,
private
projectService
:
ProjectService
,
private
employeeService
:
EmployeesService
,
private
toastr
:
ToastrService
,
private
activeModal
:
NgbActiveModal
){}
ngOnInit
():
void
{
this
.
employeeForm
=
this
.
fb
.
group
({
employee
:
[],
})
this
.
employeeService
.
getAvailableEmployees
()
.
subscribe
({
next
:
(
data
)
=>
{
console
.
log
(
data
)
this
.
employees
=
data
}
})
}
onClose
()
{
this
.
activeModal
.
close
();
}
onSubmit
(){
this
.
request
=
{
projectId
:
this
.
project
.
id
,
employeeId
:
this
.
employeeForm
.
value
.
employee
.
id
}
this
.
projectService
.
changeTeamLeader
(
this
.
request
)
.
subscribe
({
next
:
(
data
)
=>
{
this
.
toastr
.
success
(
'تم تغيير رئيس فريق العمل بنجاح'
);
},
error
:(
err
)
=>
{
this
.
toastr
.
error
(
'لقد حدث خطاء ما'
);
}
});
}
searchEmployees
=
(
text
$
:
Observable
<
string
>
)
=>
text$
.
pipe
(
debounceTime
(
200
),
distinctUntilChanged
(),
map
((
term
)
=>
term
.
length
<
1
?
[]
:
this
.
employees
.
filter
((
v
)
=>
v
.
hiastId
.
toString
().
toLowerCase
().
includes
(
term
.
toLowerCase
()))
.
slice
(
0
,
10
)
)
)
onStepSelected
(
step
:
Employee
):
void
{
this
.
employeeForm
.
patchValue
({
employeeId
:
step
.
id
});
}
employeeFormatter
=
(
result
:
any
)
:
string
=>
{
if
(
result
==
undefined
){
return
''
}
return
`
${
result
.
hiastId
}
-
${
result
.
personalInfo
.
firstName
}
${
result
.
personalInfo
.
lastName
}
`
;
}
}
src/app/projects/components/projectModals/change-manager-modal/change-manager-modal.component.css
0 → 100644
View file @
3c7b981a
src/app/projects/components/projectModals/change-manager-modal/change-manager-modal.component.html
0 → 100644
View file @
3c7b981a
<div
class=
"modal-header"
>
<h5
class=
"modal-title"
id=
"addEmployeeTrackModalLable"
>
تغيير مدير المشروع
</h5>
<button
type=
"button"
class=
"mr-4 ml-4 btn-close"
(
click
)="
onClose
()"
></button>
</div>
<div
class=
"modal-body"
>
<form
[
formGroup
]="
employeeForm
"
(
ngSubmit
)="
onSubmit
()"
>
<div
class=
"row "
>
<div
class=
"mb-3 col-8 offset-2 "
>
<label
for=
"hiastIdM"
class=
"form-label"
>
الرقم الذاتي للمدير للجديد
</label>
<input
id=
"hiastIdM"
formControlName=
"employee"
class=
"form-control"
[
ngbTypeahead
]="
searchEmployees
"
[
inputFormatter
]="
employeeFormatter
"
[
resultFormatter
]="
employeeFormatter
"
(
selectItem
)="
onStepSelected
($
event
.
item
)"
>
</div>
</div>
<div
class=
"row "
>
<div
class=
"mb-3 col-8 offset-2 "
>
<label
class=
"form-label"
>
المدير القديم
</label>
<label
class=
"form-label"
>
{{project.projectManager.personalInfo | fullname }} ,{{project.projectManager.email }}
</label>
</div>
</div>
<button
type=
"submit"
class=
"btn mr-4 ml-4 btn-primary"
[
disabled
]="!
employeeForm
.
valid
"
>
تغيير
</button>
<button
data-bs-dismiss=
"modal"
aria-label=
"Close"
class=
" mr-4 ml-4 btn btn-primary"
>
إلغاء
</button>
</form>
</div>
src/app/projects/components/projectModals/change-manager-modal/change-manager-modal.component.ts
0 → 100644
View file @
3c7b981a
import
{
Component
,
Input
,
OnInit
}
from
'@angular/core'
;
import
{
Project
}
from
'../../../models/responses/project'
;
import
{
ChangeProjectManagerRequest
}
from
'../../../models/requests/project-requests/ChangeProjectManagerRequest'
;
import
{
ProjectService
}
from
'../../../services/project.service'
;
import
{
EmployeesService
}
from
'../../../../employees/services/employees.service'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
NgbActiveModal
}
from
'@ng-bootstrap/ng-bootstrap'
;
import
{
debounceTime
,
distinctUntilChanged
,
map
,
Observable
}
from
'rxjs'
;
import
{
Employee
}
from
'../../../../employees/models/responses/employee'
;
import
{
FormBuilder
,
FormGroup
,
Validators
}
from
'@angular/forms'
;
@
Component
({
selector
:
'change-manager-modal'
,
templateUrl
:
'./change-manager-modal.component.html'
,
styleUrl
:
'./change-manager-modal.component.css'
})
export
class
ChangeManagerModalComponent
implements
OnInit
{
@
Input
()
project
:
Project
employees
:
Employee
[]
request
:
ChangeProjectManagerRequest
employeeForm
:
FormGroup
;
constructor
(
private
fb
:
FormBuilder
,
private
projectService
:
ProjectService
,
private
employeeService
:
EmployeesService
,
private
toastr
:
ToastrService
,
private
activeModal
:
NgbActiveModal
){}
ngOnInit
():
void
{
this
.
employeeForm
=
this
.
fb
.
group
({
employee
:
[],
})
this
.
employeeService
.
getAvailableEmployees
()
.
subscribe
({
next
:
(
data
)
=>
{
console
.
log
(
data
)
this
.
employees
=
data
}
})
}
onClose
()
{
this
.
activeModal
.
close
();
}
onSubmit
(){
debugger
this
.
request
=
{
projectId
:
this
.
project
.
id
,
employeeId
:
this
.
employeeForm
.
value
.
employee
.
id
}
this
.
projectService
.
changeProjectManager
(
this
.
request
)
.
subscribe
({
next
:
(
data
)
=>
{
this
.
toastr
.
success
(
'تم تغيير مدير المشروع بنجاح'
);
},
error
:(
err
)
=>
{
this
.
toastr
.
error
(
'لقد حدث خطاء ما'
);
}
});
}
searchEmployees
=
(
text
$
:
Observable
<
string
>
)
=>
text$
.
pipe
(
debounceTime
(
200
),
distinctUntilChanged
(),
map
((
term
)
=>
term
.
length
<
1
?
[]
:
this
.
employees
.
filter
((
v
)
=>
v
.
hiastId
.
toString
().
toLowerCase
().
includes
(
term
.
toLowerCase
()))
.
slice
(
0
,
10
)
)
)
onStepSelected
(
step
:
Employee
):
void
{
this
.
employeeForm
.
patchValue
({
employeeId
:
step
.
id
});
//this.stepTrackForm.patchValue({id: step.id});
}
employeeFormatter
=
(
result
:
any
)
:
string
=>
{
if
(
result
==
undefined
){
return
''
}
return
`
${
result
.
hiastId
}
-
${
result
.
personalInfo
.
firstName
}
${
result
.
personalInfo
.
lastName
}
`
;
}
}
src/app/projects/components/projectModals/project-complete-modal/project-complete-modal.component.ts
View file @
3c7b981a
...
...
@@ -30,6 +30,7 @@ export class ProjectCompleteModalComponent {
}
onClose
()
{
this
.
activeModal
.
close
();
}
...
...
src/app/projects/pages/project-details/project-details.component.html
View file @
3c7b981a
...
...
@@ -79,7 +79,7 @@
<track-controll
[
project
]="
project
"
(
complete
)="
openProjectComplete
()"
(
replan
)="
openRepan
()"
(
replan
)="
openRep
l
an
()"
>
</track-controll>
...
...
@@ -89,6 +89,9 @@
<info-controll
[
project
]="
project
"
(
changeLeader
)="
openChangeTeamLeader
()"
(
changeManager
)="
openChangeProjectManager
()"
>
</info-controll>
...
...
src/app/projects/pages/project-details/project-details.component.ts
View file @
3c7b981a
...
...
@@ -9,6 +9,8 @@ import { NgModel } from '@angular/forms';
import
{
NgbModal
}
from
'@ng-bootstrap/ng-bootstrap'
;
import
{
ProjectCompleteModalComponent
}
from
'../../components/projectModals/project-complete-modal/project-complete-modal.component'
;
import
{
ProjectReplanModalComponent
}
from
'../../components/projectModals/project-replan-modal/project-replan-modal.component'
;
import
{
ChangeManagerModalComponent
}
from
'../../components/projectModals/change-manager-modal/change-manager-modal.component'
;
import
{
ChangeLeaderModalComponent
}
from
'../../components/projectModals/change-leader-modal/change-leader-modal.component'
;
@
Component
({
...
...
@@ -45,19 +47,48 @@ export class ProjectDetailsComponent implements OnInit {
if
(
result
)
{
// Add the new project to the list
this
.
loadProject
();
}
})
}
openChangeProjectManager
(){
const
modalRef
=
this
.
modalService
.
open
(
ChangeManagerModalComponent
);
modalRef
.
componentInstance
.
project
=
this
.
project
;
modalRef
.
result
.
then
((
result
)
=>
{
if
(
result
)
{
this
.
loadProject
();
}
},
(
reason
)
=>
{
})
}
});
openChangeTeamLeader
(){
const
modalRef
=
this
.
modalService
.
open
(
ChangeLeaderModalComponent
);
modalRef
.
componentInstance
.
project
=
this
.
project
;
modalRef
.
result
.
then
((
result
)
=>
{
if
(
result
)
{
this
.
loadProject
();
}
openRepan
()
{
})
}
openReplan
()
{
const
modalRef
=
this
.
modalService
.
open
(
ProjectReplanModalComponent
);
modalRef
.
componentInstance
.
project
=
this
.
project
;
...
...
@@ -88,8 +119,6 @@ export class ProjectDetailsComponent implements OnInit {
if
(
result
)
{
// Add the new project to the list
this
.
loadProject
();
}
...
...
@@ -101,9 +130,6 @@ export class ProjectDetailsComponent implements OnInit {
}
public
downloadAsPdf
():
void
{
this
.
pdfDownloader
.
downloadAsPdf
(
'pdfContent'
);
}
loadProject
(){
this
...
...
@@ -122,4 +148,8 @@ export class ProjectDetailsComponent implements OnInit {
});
}
public
downloadAsPdf
():
void
{
this
.
pdfDownloader
.
downloadAsPdf
(
'pdfContent'
);
}
}
src/app/projects/pages/project-list/project-list.component.html
View file @
3c7b981a
...
...
@@ -8,6 +8,7 @@
<div
class=
"col-auto"
>
<button
type=
"button"
(
click
)="
this
.
router
.
navigate
(['
projects
/
create
'])"
class=
"btn btn-primary"
><span
class=
"fe fe-file-plus fe-12 mr-2"
></span>
طرح مشروع
</button>
</div>
</div>
<hr>
<div
*
ngIf=
"projects"
>
...
...
src/app/projects/projects.module.ts
View file @
3c7b981a
...
...
@@ -41,6 +41,8 @@ import { RemoveStepModalComponent } from './components/steps/remove-step-modal/r
import
{
ProjectToprogressModalComponent
}
from
'./components/projectModals/project-toprogress-modal/project-toprogress-modal.component'
;
import
{
ProjectCompleteModalComponent
}
from
'./components/projectModals/project-complete-modal/project-complete-modal.component'
;
import
{
ProjectReplanModalComponent
}
from
'./components/projectModals/project-replan-modal/project-replan-modal.component'
;
import
{
ChangeManagerModalComponent
}
from
'./components/projectModals/change-manager-modal/change-manager-modal.component'
;
import
{
ChangeLeaderModalComponent
}
from
'./components/projectModals/change-leader-modal/change-leader-modal.component'
;
@
NgModule
({
declarations
:
[
...
...
@@ -72,7 +74,9 @@ import { ProjectReplanModalComponent } from './components/projectModals/project-
RemoveStepModalComponent
,
ProjectToprogressModalComponent
,
ProjectCompleteModalComponent
,
ProjectReplanModalComponent
ProjectReplanModalComponent
,
ChangeManagerModalComponent
,
ChangeLeaderModalComponent
],
providers
:
[
ProjectService
,
...
...
src/app/tracks/components/modals/add-employee-track-modal/add-employee-track-modal.component.ts
View file @
3c7b981a
...
...
@@ -93,7 +93,7 @@ export class AddEmployeeTrackModalComponent {
employeeFormatter
=
(
result
:
any
)
:
string
=>
{
if
(
result
.
employee
==
undefined
){
if
(
result
.
employee
==
=
undefined
){
return
''
}
return
`
${
result
.
employee
.
hiastId
}
-
${
result
.
employee
.
personalInfo
.
firstName
}
${
result
.
employee
.
personalInfo
.
lastName
}
`
;
...
...
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