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
739935a3
Commit
739935a3
authored
Sep 03, 2024
by
hasan khaddour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add static pages
parent
f15b49b8
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
143 additions
and
85 deletions
+143
-85
app-routing.module.ts
src/app/app-routing.module.ts
+11
-5
app.module.ts
src/app/app.module.ts
+2
-0
roles.ts
src/app/core/constants/roles.ts
+4
-4
access-denied.component.css
src/app/pages/access-denied/access-denied.component.css
+0
-0
access-denied.component.html
src/app/pages/access-denied/access-denied.component.html
+9
-0
access-denied.component.ts
src/app/pages/access-denied/access-denied.component.ts
+10
-0
page-notfound.component.html
src/app/pages/page-notfound/page-notfound.component.html
+4
-5
project-faq.component.css
src/app/pages/project-faq/project-faq.component.css
+4
-0
project-faq.component.html
src/app/pages/project-faq/project-faq.component.html
+56
-46
types-create.component.html
...ects-types/pages/types-create/types-create.component.html
+12
-11
types-detail.component.html
...ects-types/pages/types-detail/types-detail.component.html
+3
-4
types-list.component.html
...projects-types/pages/types-list/types-list.component.html
+5
-4
projects-types.service.ts
src/app/projects-types/services/projects-types.service.ts
+1
-1
project-details.component.html
...ects/pages/project-details/project-details.component.html
+4
-3
project-details.component.ts
...ojects/pages/project-details/project-details.component.ts
+18
-2
No files found.
src/app/app-routing.module.ts
View file @
739935a3
...
@@ -8,6 +8,7 @@ import { CustomerListComponent } from './customers/pages/customer-list/customer-
...
@@ -8,6 +8,7 @@ import { CustomerListComponent } from './customers/pages/customer-list/customer-
import
{
PageNotfoundComponent
}
from
'./pages/page-notfound/page-notfound.component'
;
import
{
PageNotfoundComponent
}
from
'./pages/page-notfound/page-notfound.component'
;
import
{
ProjectFAQComponent
}
from
'./pages/project-faq/project-faq.component'
;
import
{
ProjectFAQComponent
}
from
'./pages/project-faq/project-faq.component'
;
import
{
PsmStartComponent
}
from
'./pages/psm-start/psm-start.component'
;
import
{
PsmStartComponent
}
from
'./pages/psm-start/psm-start.component'
;
import
{
AccessDeniedComponent
}
from
'./pages/access-denied/access-denied.component'
;
export
const
routes
:
Routes
=
[
export
const
routes
:
Routes
=
[
...
@@ -33,6 +34,11 @@ export const routes: Routes = [
...
@@ -33,6 +34,11 @@ export const routes: Routes = [
path
:
'Help'
,
path
:
'Help'
,
component
:
PsmStartComponent
,
component
:
PsmStartComponent
,
},
{
path
:
'forbiden'
,
component
:
AccessDeniedComponent
,
},
},
{
{
path
:
''
,
path
:
''
,
...
@@ -64,14 +70,14 @@ export const routes: Routes = [
...
@@ -64,14 +70,14 @@ export const routes: Routes = [
,
{
,
{
path
:
'types'
,
path
:
'types'
,
loadChildren
:
()
=>
import
(
'./projects-types/projects-types.module'
).
then
(
m
=>
m
.
ProjectsTypesModule
)
loadChildren
:
()
=>
import
(
'./projects-types/projects-types.module'
).
then
(
m
=>
m
.
ProjectsTypesModule
)
}
,
{
path
:
'**'
,
component
:
PageNotfoundComponent
}
}
]
]
}
}
,
{
path
:
'**'
,
component
:
PageNotfoundComponent
}
];
];
...
...
src/app/app.module.ts
View file @
739935a3
...
@@ -31,6 +31,7 @@ import { ProjectRoutingModule } from './projects/routing/project-routing.module'
...
@@ -31,6 +31,7 @@ import { ProjectRoutingModule } from './projects/routing/project-routing.module'
import
{
ProjectFAQComponent
}
from
'./pages/project-faq/project-faq.component'
;
import
{
ProjectFAQComponent
}
from
'./pages/project-faq/project-faq.component'
;
import
{
PsmStartComponent
}
from
'./pages/psm-start/psm-start.component'
;
import
{
PsmStartComponent
}
from
'./pages/psm-start/psm-start.component'
;
import
{
NgbModule
}
from
'@ng-bootstrap/ng-bootstrap'
;
import
{
NgbModule
}
from
'@ng-bootstrap/ng-bootstrap'
;
import
{
AccessDeniedComponent
}
from
'./pages/access-denied/access-denied.component'
;
@
NgModule
({
@
NgModule
({
declarations
:
[
declarations
:
[
...
@@ -40,6 +41,7 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
...
@@ -40,6 +41,7 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
PageNotfoundComponent
,
PageNotfoundComponent
,
ProjectFAQComponent
,
ProjectFAQComponent
,
PsmStartComponent
,
PsmStartComponent
,
AccessDeniedComponent
,
],
],
imports
:
[
imports
:
[
...
...
src/app/core/constants/roles.ts
View file @
739935a3
export
const
ROLES
=
{
export
const
ROLES
=
{
ADMIN
:
'Admin'
,
ADMIN
:
'Admin'
,
PROJECTS_PLANNER
:
'Planner'
,
PROJECTS_PLANNER
:
"Projects-Planner"
,
CUSTOMERS_PLANER
:
'Planner'
,
CUSTOMERS_PLANER
:
"Customer-Planner"
,
SCIENTIFIC_DEPUTY
:
'
Employee
'
,
SCIENTIFIC_DEPUTY
:
'
Scientific-Deputy
'
,
EMPLOYEE
:
'Employee'
,
EMPLOYEE
:
"Employee"
,
USER
:
'User'
,
USER
:
'User'
,
}
as
const
;
}
as
const
;
\ No newline at end of file
src/app/pages/access-denied/access-denied.component.css
0 → 100644
View file @
739935a3
src/app/pages/access-denied/access-denied.component.html
0 → 100644
View file @
739935a3
<div
class=
"container"
>
<section
class=
"section error-404 min-vh-90 d-flex flex-column align-items-center justify-content-center"
>
<h2>
عذراً، ليس لديك صلاحيات اللولوج إلى هذه الصفحة
</h2>
<a
class=
"btn"
[
routerLink
]="['/']"
>
العودة إلى الصفحة الرئيسية
</a>
<img
src=
"assets/images/not-found.svg"
class=
"img-fluid"
alt=
"Page Not Found"
>
</section>
</div>
src/app/pages/access-denied/access-denied.component.ts
0 → 100644
View file @
739935a3
import
{
Component
}
from
'@angular/core'
;
@
Component
({
selector
:
'access-denied'
,
templateUrl
:
'./access-denied.component.html'
,
styleUrl
:
'./access-denied.component.css'
})
export
class
AccessDeniedComponent
{
}
src/app/pages/page-notfound/page-notfound.component.html
View file @
739935a3
<div
class=
"container"
>
<div
class=
"container"
>
<section
class=
"section error-404 min-vh-100 d-flex flex-column align-items-center justify-content-center"
>
<section
class=
"section error-404 max-vh-80 d-flex flex-column align-items-center justify-content-center"
>
<h1>
404
</h1>
<h2>
عذراً، إن الصفحة المطلوبة غير موجودة
</h2>
<h2>
The page you are looking for doesn't exist.
</h2>
<a
class=
"btn"
[
routerLink
]="['/']"
>
العودة إلى الصفحة الرئيسية
</a>
<a
class=
"btn"
href=
"index.html"
>
Back to home
</a>
<img
src=
"assets/images/not-found.svg"
class=
"img-fluid"
alt=
"Page Not Found"
>
<img
src=
"assets/images/not-found.svg"
class=
"img-fluid py-5"
alt=
"Page Not Found"
>
</section>
</section>
</div>
</div>
src/app/pages/project-faq/project-faq.component.css
View file @
739935a3
.accordion-button
::after
{
margin-left
:
0
!important
;
padding
:
2px
;
}
\ No newline at end of file
src/app/pages/project-faq/project-faq.component.html
View file @
739935a3
This diff is collapsed.
Click to expand it.
src/app/projects-types/pages/types-create/types-create.component.html
View file @
739935a3
...
@@ -7,27 +7,27 @@
...
@@ -7,27 +7,27 @@
<div
class=
"card p-4"
>
<div
class=
"card p-4"
>
<form
#
form=
"ngForm"
class=
"php-email-form"
>
<form
#
form=
"ngForm"
class=
"php-email-form"
>
<div
class=
"row text-center"
>
<div
class=
"row text-center"
>
<
p
>
<
h4
class=
"text-center text-primary "
>
إصافة نوع مشروع
إصافة نوع مشروع
جديد
</
p
>
</
h4
>
</div>
</div>
<div
class=
"row gy-4"
>
<div
class=
"row gy-4"
>
<div
class=
"col-
12
"
>
<div
class=
"col-
6
"
>
<input
type=
"text"
[(
ngModel
)]="
request
.
typeName
"
<input
type=
"text"
[(
ngModel
)]="
request
.
typeName
"
name=
"typeName"
class=
"form-control"
placeholder=
"اسم المشروع"
required
>
name=
"typeName"
class=
"form-control"
placeholder=
"اسم المشروع"
required
>
</div>
</div>
<div
class=
"col-6"
>
<div
class=
"col-6 "
>
<input
type=
"number"
[(
ngModel
)]="
request
.
expectedEffort
"
class=
"form-control"
name=
"expectedNumberOfWorker"
placeholder=
"ساعات العمل اللازمة"
required
min=
"0"
>
</div>
<div
class=
"col-12 "
>
<textarea
type=
"tex"
[(
ngModel
)]="
request
.
description
"
[
cols
]="
4
"
name=
"description"
<textarea
type=
"tex"
[(
ngModel
)]="
request
.
description
"
[
cols
]="
4
"
name=
"description"
class=
"form-control"
name=
"requestdescription"
placeholder=
"الوصف"
minlength=
"15"
required
>
class=
"form-control"
name=
"requestdescription"
placeholder=
"الوصف"
minlength=
"15"
required
>
</textarea>
</textarea>
</div>
</div>
<div
class=
"col-6"
>
<input
type=
"number"
[(
ngModel
)]="
request
.
expectedEffort
"
class=
"form-control"
name=
"expectedNumberOfWorker"
placeholder=
"ساعات العمل اللازمة"
required
min=
"0"
>
</div>
<div
class=
"col-6"
>
<div
class=
"col-6"
>
<input
type=
"number"
[(
ngModel
)]="
request
.
expectedNumberOfWorker
"
<input
type=
"number"
[(
ngModel
)]="
request
.
expectedNumberOfWorker
"
class=
"form-control"
name=
"expectedNumberOfWorker"
placeholder=
"عدد العمال المتوقع"
required
min=
"0"
>
class=
"form-control"
name=
"expectedNumberOfWorker"
placeholder=
"عدد العمال المتوقع"
required
min=
"0"
>
...
@@ -36,7 +36,8 @@
...
@@ -36,7 +36,8 @@
<div
class=
"col-md-12 text-center"
>
<div
class=
"col-md-12 text-center"
>
<button
class=
"btn btn-primary"
[
disabled
]="
form
.
invalid
"
(
click
)="
submit
(
request
)"
>
إضافة
</button>
<button
class=
"btn m-4 btn-success"
[
disabled
]="
form
.
invalid
"
(
click
)="
submit
(
request
)"
>
إضافة
</button>
<button
class=
"btn m-4 btn-secondary"
[
routerLink
]="['/
types
']"
>
قائمة أنواع المشاريع
</button>
</div>
</div>
</div>
</div>
...
...
src/app/projects-types/pages/types-detail/types-detail.component.html
View file @
739935a3
...
@@ -51,13 +51,12 @@
...
@@ -51,13 +51,12 @@
<!-- Delete Confirmation -->
<!-- Delete Confirmation -->
<div
*
ngIf=
"modalMode === 'delete'"
>
<div
*
ngIf=
"modalMode === 'delete'"
>
<p>
هل أنت متأكد من أنك تريد حذف النوع {{ selectedtype.typeName }} ؟
</p>
<p>
هل أنت متأكد من أنك تريد حذف النوع {{ selectedtype.typeName }} ؟
</p>
<button
type=
"button"
class=
"btn m-4 btn-danger"
(
click
)="
delete
()"
>
Delete
</button>
<button
type=
"button"
class=
"btn m-4 btn-danger"
(
click
)="
delete
()"
>
إزالة
</button>
<button
type=
"button"
class=
"btn m-4 btn-secondary"
data-bs-dismiss=
"modal"
>
Cancel
</button>
<button
type=
"button"
class=
"btn m-4 btn-secondary"
data-bs-dismiss=
"modal"
>
إلغاء
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- .row -->
</div>
src/app/projects-types/pages/types-list/types-list.component.html
View file @
739935a3
...
@@ -31,8 +31,9 @@
...
@@ -31,8 +31,9 @@
<div
class=
"modal-content"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"btn-close"
data-bs-dismiss=
"modal"
aria-label=
"Close"
></button>
<button
type=
"button"
class=
"btn-close"
data-bs-dismiss=
"modal"
aria-label=
"Close"
></button>
<h5
class=
"modal-title"
id=
"modalLabel"
>
{{ modalTitle }}
</h5>
<h5
class=
"modal-title"
id=
"modalLabel"
>
{{ modalTitle }}
</h5>
</div>
</div>
<div
class=
"modal-body"
>
<div
class=
"modal-body"
>
<!-- Edit Form -->
<!-- Edit Form -->
...
@@ -44,10 +45,10 @@
...
@@ -44,10 +45,10 @@
></edit-type-modal>
></edit-type-modal>
</div>
</div>
<!-- Delete Confirmation -->
<!-- Delete Confirmation -->
<div
*
ngIf=
"modalMode === 'delete'"
>
<div
*
ngIf=
"modalMode === 'delete'"
class=
"row "
>
<p>
هل أنت متأكد من أنك تريد حذف عنصر {{ selectedItem.typeName }}?
</p>
<p>
هل أنت متأكد من أنك تريد حذف عنصر {{ selectedItem.typeName }}?
</p>
<button
type=
"button"
class=
"
btn m-4 btn-danger"
(
click
)="
delete
()"
>
Delete
</button>
<button
type=
"button"
class=
"
col-4 m-4 btn btn-danger"
(
click
)="
delete
()"
>
إزالة
</button>
<button
type=
"button"
class=
"btn
m-4 btn-secondary"
data-bs-dismiss=
"modal"
>
Cancel
</button>
<button
type=
"button"
class=
"btn
col-4 my-4 btn-secondary"
data-bs-dismiss=
"modal"
>
إلغاء
</button>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/app/projects-types/services/projects-types.service.ts
View file @
739935a3
...
@@ -47,7 +47,7 @@ export class ProjectsTypesService {
...
@@ -47,7 +47,7 @@ export class ProjectsTypesService {
return
this
return
this
.
http
.
http
.
delete
<
void
>
.
delete
<
void
>
(
this
.
config
.
getServerUrl
()
+
"/ProjectsTypes"
+
typeId
);
(
this
.
config
.
getServerUrl
()
+
"/ProjectsTypes
/
"
+
typeId
);
}
}
...
...
src/app/projects/pages/project-details/project-details.component.html
View file @
739935a3
...
@@ -68,7 +68,8 @@
...
@@ -68,7 +68,8 @@
<hr>
<hr>
<plan-controll
<plan-controll
[
project
]="
project
"
*
ngIf=
"project.currentState.toLocaleLowerCase()=='inplan'"
[
project
]="
project
"
(
toProgress
)="
openMoveToProgressModal
()"
(
toProgress
)="
openMoveToProgressModal
()"
>
>
...
@@ -77,7 +78,8 @@
...
@@ -77,7 +78,8 @@
<hr>
<hr>
<track-controll
<track-controll
[
project
]="
project
"
*
ngIf=
"project.currentState.toLocaleLowerCase()=='inprogress'"
[
project
]="
project
"
(
complete
)="
openProjectComplete
()"
(
complete
)="
openProjectComplete
()"
(
replan
)="
openReplan
()"
(
replan
)="
openReplan
()"
>
>
...
@@ -91,7 +93,6 @@
...
@@ -91,7 +93,6 @@
[
project
]="
project
"
[
project
]="
project
"
(
changeLeader
)="
openChangeTeamLeader
()"
(
changeLeader
)="
openChangeTeamLeader
()"
(
changeManager
)="
openChangeProjectManager
()"
(
changeManager
)="
openChangeProjectManager
()"
>
>
</info-controll>
</info-controll>
...
...
src/app/projects/pages/project-details/project-details.component.ts
View file @
739935a3
...
@@ -11,6 +11,8 @@ import { ProjectCompleteModalComponent } from '../../components/projectModals/pr
...
@@ -11,6 +11,8 @@ import { ProjectCompleteModalComponent } from '../../components/projectModals/pr
import
{
ProjectReplanModalComponent
}
from
'../../components/projectModals/project-replan-modal/project-replan-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
{
ChangeManagerModalComponent
}
from
'../../components/projectModals/change-manager-modal/change-manager-modal.component'
;
import
{
ChangeLeaderModalComponent
}
from
'../../components/projectModals/change-leader-modal/change-leader-modal.component'
;
import
{
ChangeLeaderModalComponent
}
from
'../../components/projectModals/change-leader-modal/change-leader-modal.component'
;
import
{
UserService
}
from
'../../../core/services/authentication/user.service'
;
import
{
ROLES
}
from
'../../../core/constants/roles'
;
@
Component
({
@
Component
({
...
@@ -28,6 +30,7 @@ export class ProjectDetailsComponent implements OnInit {
...
@@ -28,6 +30,7 @@ export class ProjectDetailsComponent implements OnInit {
private
projectService
:
ProjectService
,
private
projectService
:
ProjectService
,
private
toastr
:
ToastrService
,
private
toastr
:
ToastrService
,
private
modalService
:
NgbModal
,
private
modalService
:
NgbModal
,
private
userService
:
UserService
,
private
pdfDownloader
:
PdfDownloaderService
private
pdfDownloader
:
PdfDownloaderService
)
{}
)
{}
...
@@ -137,8 +140,21 @@ export class ProjectDetailsComponent implements OnInit {
...
@@ -137,8 +140,21 @@ export class ProjectDetailsComponent implements OnInit {
.
getProjectById
(
this
.
projectId
)
.
getProjectById
(
this
.
projectId
)
.
subscribe
({
.
subscribe
({
next
:(
data
)
=>
{
next
:(
data
)
=>
{
this
.
project
=
data
;
if
(
data
.
projectManager
.
id
==
this
.
userService
.
getEmployeeId
()
||
data
.
teamLeader
.
id
==
this
.
userService
.
getEmployeeId
()
||
this
.
userService
.
hasRole
(
ROLES
.
SCIENTIFIC_DEPUTY
)
){
this
.
project
=
data
;
}
else
{
this
.
toastr
.
error
(
'ليس مخولا لك الولوج إلى هذه الصفحة'
)
this
.
router
.
navigate
([
'/forbiden'
])
}
},
},
error
:
(
err
)
=>
{
error
:
(
err
)
=>
{
...
...
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