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
e007a8a7
Commit
e007a8a7
authored
Aug 22, 2024
by
hasan khaddour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add step serivce
parent
e81337ba
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
136 additions
and
4 deletions
+136
-4
Attachment.ts
src/app/projects/models/responses/Attachment.ts
+5
-4
FinancialSpending.ts
src/app/projects/models/responses/FinancialSpending.ts
+11
-0
project.ts
src/app/projects/models/responses/project.ts
+2
-0
project-details.component.html
...ects/pages/project-details/project-details.component.html
+29
-0
step.service.ts
src/app/projects/services/step.service.ts
+75
-0
steptrack.ts
src/app/tracks/models/responses/steptrack.ts
+14
-0
No files found.
src/app/projects/models/responses/Attachment.ts
View file @
e007a8a7
export
interface
Attachment
{
export
interface
Attachment
{
projectId
:
number
;
id
:
number
attachmentUrl
:
string
;
projectId
:
number
attachmentDescription
:
string
;
attachmentUrl
:
string
attachmentName
:
string
;
attachmentName
:
string
attachmentDescription
:
string
}
}
src/app/projects/models/responses/FinancialSpending.ts
0 → 100644
View file @
e007a8a7
export
class
FinancialSpending
{
id
:
number
;
expectedSpendingDate
:
number
;
costType
:
number
;
description
:
string
;
localPurchase
:
number
;
externalPurchase
:
{
ammount
:
number
;
currency
:
string
;
};
}
src/app/projects/models/responses/project.ts
View file @
e007a8a7
...
@@ -8,6 +8,7 @@ import { ProposalInfo } from "../valueObjects/proposalInfo"
...
@@ -8,6 +8,7 @@ import { ProposalInfo } from "../valueObjects/proposalInfo"
import
{
ProjectClassification
}
from
"../valueObjects/ProjectClassification"
import
{
ProjectClassification
}
from
"../valueObjects/ProjectClassification"
import
{
Department
}
from
"./Department"
import
{
Department
}
from
"./Department"
import
{
Step
}
from
"./Step"
import
{
Step
}
from
"./Step"
import
{
FinancialSpending
}
from
"./FinancialSpending"
export
class
Project
export
class
Project
{
{
id
:
number
id
:
number
...
@@ -24,6 +25,7 @@ export class Project
...
@@ -24,6 +25,7 @@ export class Project
proposerId
:
number
proposerId
:
number
proposer
:
Customer
proposer
:
Customer
steps
:
Step
[]
steps
:
Step
[]
financialSpending
:
FinancialSpending
[]
employeeParticipates
:
EmployeeParticipate
[]
employeeParticipates
:
EmployeeParticipate
[]
financialFund
:
FinancialFund
financialFund
:
FinancialFund
}
}
...
...
src/app/projects/pages/project-details/project-details.component.html
View file @
e007a8a7
...
@@ -101,6 +101,35 @@
...
@@ -101,6 +101,35 @@
</tbody>
</tbody>
</table>
</table>
<p>
خطة الانفاق
</p>
<table
class=
"table table-borderless table-striped"
>
<thead>
<tr>
<th
scope=
"col"
>
#
</th>
<th
scope=
"col"
clsss=
"text-center"
>
نوع الكلفة
</th>
<th
scope=
"col"
class=
"text-center"
>
البيان
</th>
<th
scope=
"col"
class=
"text-center"
>
الشراء المحلي
</th>
<th
scope=
"col"
class=
"text-center"
>
الشراء الخارجي
</th>
<th
scope=
"col"
class=
"text-center"
>
نوع القطع
</th>
<th
scope=
"col"
class=
"text-center"
>
تاريخ الانفاق المتوقع
</th>
</tr>
</thead>
<tbody>
<tr
*
ngFor=
"let spend of project.financialSpending"
>
<th
scope=
"row"
></th>
<td
class=
"text-center"
>
{{spend.costType}}
</td>
<td
class=
"text-center"
>
{{spend.description }}
</td>
<td
class=
"text-center"
>
{{spend.localPurchase}}
</td>
<td
class=
"text-center"
>
{{spend.externalPurchase.ammount}}
</td>
<td
class=
"text-center"
>
{{spend.externalPurchase.currency}}
</td>
<td
class=
"text-center"
>
{{spend.expectedSpendingDate | date}}
</td>
</tr>
</tbody>
</table>
<div
class=
"row mt-5"
>
<div
class=
"row mt-5"
>
<div
class=
"col-2 text-center"
>
<div
class=
"col-2 text-center"
>
...
...
src/app/projects/services/step.service.ts
0 → 100644
View file @
e007a8a7
import
{
HttpClient
}
from
'@angular/common/http'
;
import
{
ChangeDetectorRef
,
Injectable
}
from
'@angular/core'
;
import
{
ConfigurationService
}
from
'../../core/services/configuration/configuration.service'
;
import
{
Observable
}
from
'rxjs'
;
import
{
Step
}
from
'../models/responses/Step'
;
import
{
ChangeStepWeightRequest
}
from
'../models/requests/step-requests/changeStepWeightRequest'
;
import
{
GetStepTrackHistoryRequest
}
from
'../models/requests/step-requests/GetStepTrackHistoryRequest'
;
import
{
StepTrack
}
from
'../../tracks/models/responses/steptrack'
;
import
{
UpdateCompletionRatioRequest
}
from
'../models/requests/step-requests/UpdateCompletionRatioRequest'
;
@
Injectable
({
providedIn
:
'root'
})
export
class
StepService
{
constructor
(
private
http
:
HttpClient
,
private
config
:
ConfigurationService
)
{
}
// this method responsible for get a specificef step
//
public
getStepById
(
stepId
:
number
):
Observable
<
Step
[]
>
{
return
this
.
http
.
get
<
Step
[]
>
(
this
.
config
.
getServerUrl
()
+
"/Steps/"
+
stepId
);
}
// this method responsible for get the steps of a specified project
//
public
getStepsByProject
(
projectId
:
number
):
Observable
<
Step
[]
>
{
return
this
.
http
.
get
<
Step
[]
>
(
this
.
config
.
getServerUrl
()
+
"/Steps/ByProject/"
+
projectId
);
}
// this method responsible for change the step weight of a step
//
public
changeStepWeight
(
request
:
ChangeStepWeightRequest
):
Observable
<
void
>
{
return
this
.
http
.
put
<
void
>
(
this
.
config
.
getServerUrl
()
+
"/Steps/ChangeStepWeight/"
+
request
.
stepId
,
request
);
}
// this method responsible for get a step track history
//
public
getStepTrackHistory
(
request
:
GetStepTrackHistoryRequest
):
Observable
<
StepTrack
[]
>
{
let
pagination
=
this
.
getPagination
(
request
.
pageSize
,
request
.
pageNumber
);
return
this
.
http
.
get
<
StepTrack
[]
>
(
`
${
this
.
config
.
getServerUrl
()}
/Steps/StepTrackHistory/?stepId=
${
request
.
stepId
}${
pagination
}
`
);
}
// this method responsible for update the step completion ratio
//
public
changeCompletionRatio
(
request
:
UpdateCompletionRatioRequest
):
Observable
<
void
>
{
return
this
.
http
.
put
<
void
>
(
`
${
this
.
config
.
getServerUrl
()}
/Steps/ChangeCompletionRatio/?stepId=
${
request
.
stepId
}
`
,
request
);
}
// this method responsible for delet the step
//
public
deleteSep
(
stepId
:
number
):
Observable
<
void
>
{
return
this
.
http
.
delete
<
void
>
(
`
${
this
.
config
.
getServerUrl
()}
/Steps/
${
stepId
}
`
);
}
//#region pagination convert
private
getPagination
(
pageSize
:
number
|
null
,
pageNumber
:
number
|
null
){
if
(
pageNumber
==
null
||
pageSize
==
null
){
return
""
;
}
else
{
return
`&pageSize=
${
pageSize
}
&PageNumber=
${
pageNumber
}
`
;
}
}
//#endregion pagination convert
}
src/app/tracks/models/responses/steptrack.ts
View file @
e007a8a7
import
{
StepInfo
}
from
"../../../projects/models/valueObjects/StepInfo"
import
{
TrackInfo
}
from
"../valueObjects/trackInfo"
export
class
StepTrack
{
id
:
number
stepId
:
number
trackId
:
number
stepInfo
:
StepInfo
trackInfo
:
TrackInfo
executionState
:
number
trackExecutionRatio
:
number
oldExecutionRatio
:
number
}
\ No newline at end of file
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