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
c63882b7
Commit
c63882b7
authored
Sep 04, 2024
by
hasan khaddour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix elements
parent
e58c887e
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
122 additions
and
46 deletions
+122
-46
updateProjectTypeRequest.ts
...rojects-types/models/requests/updateProjectTypeRequest.ts
+1
-1
types-detail.component.html
...ects-types/pages/types-detail/types-detail.component.html
+2
-31
types-detail.component.ts
...ojects-types/pages/types-detail/types-detail.component.ts
+44
-0
types-list.component.html
...projects-types/pages/types-list/types-list.component.html
+9
-4
types-list.component.ts
...p/projects-types/pages/types-list/types-list.component.ts
+43
-0
employee-track-history.component.html
...loyee-track-history/employee-track-history.component.html
+6
-3
project-track-history.component.html
...roject-track-history/project-track-history.component.html
+5
-2
step-track-history.component.html
...ages/step-track-history/step-track-history.component.html
+4
-2
tracks-list.component.html
src/app/tracks/pages/tracks-list/tracks-list.component.html
+8
-3
No files found.
src/app/projects-types/models/requests/updateProjectTypeRequest.ts
View file @
c63882b7
export
class
UpdateTypeRequest
{
export
class
UpdateTypeRequest
{
id
:
number
id
:
number
typeName
:
string
typeName
:
string
description
:
S
tring
description
:
s
tring
expectedEffort
:
number
expectedEffort
:
number
expectedNumberOfWorker
:
number
;
expectedNumberOfWorker
:
number
;
}
}
...
...
src/app/projects-types/pages/types-detail/types-detail.component.html
View file @
c63882b7
...
@@ -21,42 +21,13 @@
...
@@ -21,42 +21,13 @@
</div>
</div>
<div
class=
"row mb-4"
>
<div
class=
"row mb-4"
>
<button
[
disabled
]="!
canEdit
()"
class=
"col-3 offset-1 m-4 btn btn-danger"
(
click
)="
open
Modal
('
delete
'
)"
>
إزالة
</button>
<button
[
disabled
]="!
canEdit
()"
class=
"col-3 offset-1 m-4 btn btn-danger"
(
click
)="
open
DeleteModal
(
type
)"
>
إزالة
</button>
<button
[
disabled
]="!
canEdit
()"
class=
"col-3 offset-1 m-4 btn btn-primary"
(
click
)="
open
Modal
('
edit
'
)"
>
تعديل
</button>
<button
[
disabled
]="!
canEdit
()"
class=
"col-3 offset-1 m-4 btn btn-primary"
(
click
)="
open
EditModal
(
type
)"
>
تعديل
</button>
</div>
</div>
</div>
<!-- /.card-body -->
</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
</div>
<!-- /.card -->
</div>
<!-- /.col-12 -->
</div>
<!-- /.col-12 -->
<div
class=
"modal fade"
id=
"typeModal"
tabindex=
"-1"
aria-labelledby=
"modalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog modal-dialog-centered"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"mr-4 ml-4 btn-close"
data-bs-dismiss=
"modal"
aria-label=
"Close"
></button>
<h5
class=
"modal-title"
id=
"modalLabel"
>
{{ modalTitle }}
</h5>
</div>
<div
class=
"modal-body"
>
<!-- Edit Form -->
<div
*
ngIf=
"modalMode === 'edit'"
>
<edit-type-modal
[
selectedItem
]="
selectedtype
"
(
submit
)="
saveType
()"
>
</edit-type-modal>
</div>
<!-- Delete Confirmation -->
<div
*
ngIf=
"modalMode === 'delete'"
>
<p>
هل أنت متأكد من أنك تريد حذف النوع {{ selectedtype.typeName }} ؟
</p>
<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"
>
إلغاء
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
src/app/projects-types/pages/types-detail/types-detail.component.ts
View file @
c63882b7
...
@@ -7,6 +7,9 @@ import { Modal } from 'bootstrap';
...
@@ -7,6 +7,9 @@ import { Modal } from 'bootstrap';
import
{
UpdateTypeRequest
}
from
'../../models/requests/updateProjectTypeRequest'
;
import
{
UpdateTypeRequest
}
from
'../../models/requests/updateProjectTypeRequest'
;
import
{
UserService
}
from
'../../../core/services/authentication/user.service'
;
import
{
UserService
}
from
'../../../core/services/authentication/user.service'
;
import
{
ROLES
}
from
'../../../core/constants/roles'
;
import
{
ROLES
}
from
'../../../core/constants/roles'
;
import
{
NgbModal
}
from
'@ng-bootstrap/ng-bootstrap'
;
import
{
RemoveTyoeModalComponent
}
from
'../../components/remove-tyoe-modal/remove-tyoe-modal.component'
;
import
{
EditTypeModalComponent
}
from
'../../components/edit-type-modal/edit-type-modal.component'
;
@
Component
({
@
Component
({
selector
:
'types-detail'
,
selector
:
'types-detail'
,
...
@@ -26,6 +29,7 @@ export class TypesDetailComponent implements OnInit{
...
@@ -26,6 +29,7 @@ export class TypesDetailComponent implements OnInit{
private
route
:
ActivatedRoute
,
private
route
:
ActivatedRoute
,
private
toastr
:
ToastrService
,
private
toastr
:
ToastrService
,
private
router
:
Router
,
private
router
:
Router
,
private
modalService
:
NgbModal
,
private
userService
:
UserService
private
userService
:
UserService
){}
){}
...
@@ -62,6 +66,46 @@ export class TypesDetailComponent implements OnInit{
...
@@ -62,6 +66,46 @@ export class TypesDetailComponent implements OnInit{
}
}
}
}
openDeleteModal
(
item
:
ProjectType
):
void
{
const
modalRef
=
this
.
modalService
.
open
(
RemoveTyoeModalComponent
);
modalRef
.
componentInstance
.
selectedItem
=
this
.
type
;
modalRef
.
result
.
then
((
result
:
number
)
=>
{
if
(
result
)
{
this
.
router
.
navigate
([
'/types'
])
}
},
(
reason
)
=>
{
});
}
openEditModal
(
item
:
ProjectType
):
void
{
const
modalRef
=
this
.
modalService
.
open
(
EditTypeModalComponent
);
modalRef
.
componentInstance
.
selectedItem
=
item
;
modalRef
.
result
.
then
((
result
:
UpdateTypeRequest
)
=>
{
if
(
result
)
{
let
sp
=
this
.
type
;
sp
!
.
description
=
result
.
description
sp
!
.
expectedEffort
=
result
.
expectedEffort
sp
!
.
expectedNumberOfWorker
=
result
.
expectedNumberOfWorker
sp
!
.
typeName
=
result
.
typeName
}
},
(
reason
)
=>
{
});
}
saveType
():
void
{
saveType
():
void
{
let
request
:
UpdateTypeRequest
=
{
let
request
:
UpdateTypeRequest
=
{
...
...
src/app/projects-types/pages/types-list/types-list.component.html
View file @
c63882b7
...
@@ -15,13 +15,18 @@
...
@@ -15,13 +15,18 @@
<type-item
class=
" offset-2"
<type-item
class=
" offset-2"
*
ngFor=
"let item of types"
*
ngFor=
"let item of types"
[
item
]="
item
"
[
item
]="
item
"
(
edit
)="
open
Modal
('
edit
',
item
)"
(
edit
)="
open
EditModal
(
item
)"
(
delete
)="
open
Modal
('
delete
',
item
)"
(
delete
)="
open
DeleteModal
(
item
)"
>
>
</type-item>
</type-item>
<div
*
ngIf=
"types.length==0"
>
<div
*
ngIf=
"types.length==0"
class=
"text-center text-primary"
>
<strong>
للأسف حاليا لايوجد أنواع مشاريع
للأسف حاليا لايوجد أنواع مشاريع
</strong>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/app/projects-types/pages/types-list/types-list.component.ts
View file @
c63882b7
...
@@ -8,6 +8,8 @@ import { ProjectType } from '../../models/responses/projectType';
...
@@ -8,6 +8,8 @@ import { ProjectType } from '../../models/responses/projectType';
import
{
UpdateTypeRequest
}
from
'../../models/requests/updateProjectTypeRequest'
;
import
{
UpdateTypeRequest
}
from
'../../models/requests/updateProjectTypeRequest'
;
import
{
ROLES
}
from
'../../../core/constants/roles'
;
import
{
ROLES
}
from
'../../../core/constants/roles'
;
import
{
UserService
}
from
'../../../core/services/authentication/user.service'
;
import
{
UserService
}
from
'../../../core/services/authentication/user.service'
;
import
{
RemoveTyoeModalComponent
}
from
'../../components/remove-tyoe-modal/remove-tyoe-modal.component'
;
import
{
EditTypeModalComponent
}
from
'../../components/edit-type-modal/edit-type-modal.component'
;
@
Component
({
@
Component
({
selector
:
'types-list'
,
selector
:
'types-list'
,
...
@@ -55,6 +57,47 @@ export class TypesListComponent {
...
@@ -55,6 +57,47 @@ export class TypesListComponent {
}
}
openDeleteModal
(
item
:
ProjectType
):
void
{
const
modalRef
=
this
.
modalService
.
open
(
RemoveTyoeModalComponent
);
modalRef
.
componentInstance
.
selectedItem
=
item
;
modalRef
.
result
.
then
((
result
:
number
)
=>
{
if
(
result
)
{
this
.
types
=
this
.
types
.
filter
(
e
=>
e
.
id
==
item
.
id
)
}
},
(
reason
)
=>
{
});
}
openEditModal
(
item
:
ProjectType
):
void
{
const
modalRef
=
this
.
modalService
.
open
(
EditTypeModalComponent
);
modalRef
.
componentInstance
.
selectedItem
=
item
;
modalRef
.
result
.
then
((
result
:
UpdateTypeRequest
)
=>
{
if
(
result
)
{
let
sp
=
this
.
types
.
find
(
e
=>
e
.
id
==
item
.
id
);
sp
!
.
description
=
result
.
description
sp
!
.
expectedEffort
=
result
.
expectedEffort
sp
!
.
expectedNumberOfWorker
=
result
.
expectedNumberOfWorker
sp
!
.
typeName
=
result
.
typeName
}
},
(
reason
)
=>
{
});
}
openModal
(
mode
:
'edit'
|
'delete'
,
item
:
ProjectType
):
void
{
openModal
(
mode
:
'edit'
|
'delete'
,
item
:
ProjectType
):
void
{
this
.
modalMode
=
mode
;
this
.
modalMode
=
mode
;
this
.
selectedItem
=
{
...
item
};
// Clone project to prevent direct mutation
this
.
selectedItem
=
{
...
item
};
// Clone project to prevent direct mutation
...
...
src/app/tracks/pages/employee-track-history/employee-track-history.component.html
View file @
c63882b7
...
@@ -17,8 +17,11 @@
...
@@ -17,8 +17,11 @@
>
>
</employee-history-item>
</employee-history-item>
<div
*
ngIf=
"employeeTrackHistory.length==0"
>
<div
*
ngIf=
"employeeTrackHistory.length==0"
class=
"text-center text-primary"
>
<strong>
لم تتم متابعة هذا العامل من قبل
لم تتم متابعة هذا العامل من قبل
</strong>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/app/tracks/pages/project-track-history/project-track-history.component.html
View file @
c63882b7
...
@@ -19,9 +19,12 @@
...
@@ -19,9 +19,12 @@
></track-item>
></track-item>
<div
*
ngIf=
"tracks.length==0"
>
<div
*
ngIf=
"tracks.length==0"
class=
"text-center text-primary"
>
<strong>
للأسف هذا المروع لايحوي على أية مراحل
للأسف هذا المروع لايحوي على أية مراحل
</div>
</strong>
</div>
</div>
</div>
</div>
</div>
</section>
</section>
...
...
src/app/tracks/pages/step-track-history/step-track-history.component.html
View file @
c63882b7
...
@@ -16,9 +16,11 @@
...
@@ -16,9 +16,11 @@
>
>
</step-history-item>
</step-history-item>
<div
*
ngIf=
"stepTrackHistory.length==0"
>
<div
*
ngIf=
"stepTrackHistory.length==0"
class=
"text-center text-primary"
>
<strong>
لم تتم متابعة هذه المرحلة من قبل
لم تتم متابعة هذه المرحلة من قبل
</div>
</
strong></
div>
</div>
</div>
</div>
</div>
</section>
</section>
...
...
src/app/tracks/pages/tracks-list/tracks-list.component.html
View file @
c63882b7
...
@@ -57,8 +57,13 @@
...
@@ -57,8 +57,13 @@
</div>
<!-- / .card-body -->
</div>
<!-- / .card-body -->
</div>
</div>
<div
*
ngIf=
"tracks.length==0"
>
<div
*
ngIf=
"tracks.length==0"
class=
"text-center text-primary"
>
<strong>
للأسف لايحوي على أية متابعات
للأسف لايحوي على أية متابعات
</strong>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
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