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
0cb692ee
Commit
0cb692ee
authored
Sep 07, 2024
by
hasan khaddour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add scroll top
parent
ad1fd4fc
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
128 additions
and
15 deletions
+128
-15
app.component.html
src/app/app.component.html
+1
-0
app.module.ts
src/app/app.module.ts
+4
-1
add-attachment-modal.component.html
.../add-attachment-modal/add-attachment-modal.component.html
+24
-3
add-attachment-modal.component.ts
...ls/add-attachment-modal/add-attachment-modal.component.ts
+37
-5
financial-spending.component.html
...ages/financial-spending/financial-spending.component.html
+5
-1
project-details.component.html
...ects/pages/project-details/project-details.component.html
+3
-1
projects.module.ts
src/app/projects/projects.module.ts
+6
-0
card-skeleton.component.html
...ed/componenets/card-skeleton/card-skeleton.component.html
+1
-1
shared.module.ts
src/app/shared/shared.module.ts
+4
-3
layout.component.css
src/app/shared/sharedLayout/layout/layout.component.css
+8
-0
layout.component.html
src/app/shared/sharedLayout/layout/layout.component.html
+1
-0
styles.css
src/styles.css
+34
-0
No files found.
src/app/app.component.html
View file @
0cb692ee
<loading-spinner
hidden
></loading-spinner>
<router-outlet
/>
src/app/app.module.ts
View file @
0cb692ee
...
...
@@ -32,6 +32,8 @@ import { ProjectFAQComponent } from './pages/project-faq/project-faq.component';
import
{
PsmStartComponent
}
from
'./pages/psm-start/psm-start.component'
;
import
{
NgbModule
}
from
'@ng-bootstrap/ng-bootstrap'
;
import
{
AccessDeniedComponent
}
from
'./pages/access-denied/access-denied.component'
;
import
{
ScrollTopModule
}
from
'primeng/scrolltop'
;
@
NgModule
({
declarations
:
[
...
...
@@ -54,6 +56,7 @@ import { AccessDeniedComponent } from './pages/access-denied/access-denied.compo
CoreModule
,
CustomersModule
,
SharedModule
,
ScrollTopModule
,
NgxPaginationModule
,
BrowserAnimationsModule
,
// Required for toast animations
ToastrModule
.
forRoot
({
...
...
@@ -61,7 +64,7 @@ import { AccessDeniedComponent } from './pages/access-denied/access-denied.compo
timeOut
:
3000
,
// Toast timeout
preventDuplicates
:
true
,
progressBar
:
true
,
// Prevent duplicate toasts
}),
}),
HttpClientModule
,
NgbModule
...
...
src/app/projects/components/modals/add-attachment-modal/add-attachment-modal.component.html
View file @
0cb692ee
...
...
@@ -18,7 +18,7 @@
/>
</div>
<div
class=
"mb-3 col-
8 offset-1
"
>
<div
class=
"mb-3 col-
7
"
>
<label
for=
"attachmentDescription"
class=
"form-label"
>
الوصف
</label>
<textarea
[
cols
]="
4
"
...
...
@@ -36,9 +36,30 @@
(
change
)="
onFileSelected
($
event
)"
[(
ngModel
)]="
item
.
file
"
required
/>
</div>
<p-fileUpload
class=
"col-10 offset-1"
[
customUpload
]="
true
"
(
uploadHandler
)="
onFileSelected
($
event
)"
[
multiple
]="
false
"
maxFileSize=
"1000000"
chooseLabel=
" اختر ملف "
uploadLabel=
" تحميل "
cancelLabel=
" إلغاء "
>
<ng-template
pTemplate=
"content"
>
<ul
*
ngIf=
"uploadedFiles.length"
>
<li
*
ngFor=
"let file of uploadedFiles"
>
{{ file.name }} - {{ file.size }} bytes
</li>
</ul>
</ng-template>
</p-fileUpload>
</div>
<div
class=
"row"
>
</div>
<div
class=
"row"
>
<button
[
disabled
]="
form
.
invalid
"
type=
"submit"
...
...
src/app/projects/components/modals/add-attachment-modal/add-attachment-modal.component.ts
View file @
0cb692ee
...
...
@@ -13,6 +13,8 @@ import { ProjectService } from '../../../services/project.service';
})
export
class
AddAttachmentModalComponent
{
@
Input
()
projectId
:
number
uploadedFiles
:
any
[]
=
[];
totalSize
=
0
@
Output
()
itemAdded
=
new
EventEmitter
<
void
>
();
item
:
AddAttachmentRequest
...
...
@@ -53,13 +55,43 @@ export class AddAttachmentModalComponent {
})
}
onFileSelected
(
event
:
Event
):
void
{
const
input
=
event
.
target
as
HTMLInputElement
;
if
(
input
.
files
?.
length
)
{
this
.
selectedFile
=
input
.
files
[
0
];
// Method to handle file selection
onFileSelected
(
event
:
any
):
void
{
const
files
=
event
.
files
;
this
.
totalSize
=
files
.
reduce
((
acc
:
number
,
file
:
File
)
=>
acc
+
file
.
size
,
0
);
if
(
files
.
length
>
0
)
{
this
.
selectedFile
=
files
[
0
];
// Set the selected file
}
}
onClose
():
void
{
// Method to handle file upload
onTemplatedUpload
(
event
:
{
files
:
File
[]
}):
void
{
if
(
!
this
.
selectedFile
)
{
return
;
}
}
choose
(
event
:
any
,
chooseCallback
:
Function
):
void
{
chooseCallback
();
}
uploadEvent
(
uploadCallback
:
Function
):
void
{
uploadCallback
();
}
onRemoveTemplatingFile
(
event
:
any
,
file
:
any
,
removeFileCallback
:
Function
,
index
:
number
):
void
{
removeFileCallback
(
index
);
}
// File size formatting helper
formatSize
(
bytes
:
number
):
string
{
if
(
bytes
===
0
)
return
'0 Bytes'
;
const
k
=
1024
;
const
sizes
=
[
'Bytes'
,
'KB'
,
'MB'
,
'GB'
,
'TB'
];
const
i
=
Math
.
floor
(
Math
.
log
(
bytes
)
/
Math
.
log
(
k
));
return
parseFloat
((
bytes
/
Math
.
pow
(
k
,
i
)).
toFixed
(
2
))
+
' '
+
sizes
[
i
];
}
onClose
():
void
{
this
.
activeModal
.
close
();
}
...
...
src/app/projects/pages/financial-spending/financial-spending.component.html
View file @
0cb692ee
...
...
@@ -97,4 +97,8 @@
</div>
</div>
</div>
</div>
\ No newline at end of file
</div>
<card-skeleton
*
ngif=
"!spends"
>
</card-skeleton>
\ No newline at end of file
src/app/projects/pages/project-details/project-details.component.html
View file @
0cb692ee
...
...
@@ -120,4 +120,6 @@
</div>
\ No newline at end of file
<card-skeleton
*
ngIf=
"!project"
class=
"col-10"
>
</card-skeleton>
\ No newline at end of file
src/app/projects/projects.module.ts
View file @
0cb692ee
import
{
NgModule
}
from
'@angular/core'
;
import
{
CommonModule
}
from
'@angular/common'
;
import
{
FileUploadModule
}
from
'primeng/fileupload'
;
import
{
TimelineModule
}
from
'primeng/timeline'
;
import
{
ProjectItemComponent
}
from
'./components/project-item/project-item.component'
;
import
{
ProjectListComponent
}
from
'./pages/project-list/project-list.component'
;
...
...
@@ -54,6 +55,9 @@ import { EditFinancialModalComponent } from './components/edit-financial-modal/e
import
{
RemoveFinancialModalComponent
}
from
'./components/remove-financial-modal/remove-financial-modal.component'
;
import
{
CardModule
}
from
'primeng/card'
;
import
{
ButtonModule
}
from
'primeng/button'
;
import
{
BadgeModule
}
from
'primeng/badge'
;
import
{
ProgressBarModule
}
from
'primeng/progressbar'
;
@
NgModule
({
declarations
:
[
...
...
@@ -122,6 +126,8 @@ import { ProgressBarModule } from 'primeng/progressbar';
ReactiveFormsModule
,
SharedModule
,
SkeletonModule
,
FileUploadModule
,
BadgeModule
,
NgbTypeaheadModule
]
})
...
...
src/app/shared/componenets/card-skeleton/card-skeleton.component.html
View file @
0cb692ee
<div
class=
"card shadow mb-4 col-8 offset-2"
*
ngIf=
"!steps"
>
<div
class=
"card shadow mb-4 col-8 offset-2"
>
<div
class=
"card-header py-3"
>
<div
class=
"row align-items-center"
>
<div
class=
"col-auto"
>
...
...
src/app/shared/shared.module.ts
View file @
0cb692ee
...
...
@@ -35,8 +35,9 @@ import { SkeletonModule } from 'primeng/skeleton';
],
imports
:
[
CommonModule
,
RouterModule
],
RouterModule
,
SkeletonModule
],
exports
:[
HeaderComponent
,
FooterComponent
,
...
...
@@ -45,7 +46,7 @@ import { SkeletonModule } from 'primeng/skeleton';
FullnamePipe
,
StateTranslatePipe
,
CardItemComponent
,
SkeletonModule
,
CardSkeletonComponent
,
ProgressBarModule
,
LoadingSpinnerComponent
],
schemas
:
[
CUSTOM_ELEMENTS_SCHEMA
]
...
...
src/app/shared/sharedLayout/layout/layout.component.css
View file @
0cb692ee
...
...
@@ -8,11 +8,19 @@
.nav-link
,
.navbar-brand
{
color
:
#fff
!important
;
}
.custom-scrolltop
{
z-index
:
1000
;
/* Ensure it's above other components */
}
/*--------------------------------------------------------------
# Main
--------------------------------------------------------------*/
#main
{
margin-top
:
60px
;
overflow-y
:
auto
;
padding
:
20px
30px
;
transition
:
all
0.3s
;
}
...
...
src/app/shared/sharedLayout/layout/layout.component.html
View file @
0cb692ee
...
...
@@ -8,5 +8,6 @@
</div>
<app-sidebar
[
isToggled
]="
isToggled
"
></app-sidebar>
<app-footer
[
class
.
maine
]="
isToggled
"
></app-footer>
<p-scrollTop
target=
"main"
styleClass=
"custom-scrolltop"
[
threshold
]="
100
"
icon=
"pi pi-arrow-up"
/>
</div>
src/styles.css
View file @
0cb692ee
...
...
@@ -31,6 +31,7 @@
background-size
:
var
(
--bs-accordion-btn-icon-width
);
transition
:
var
(
--bs-accordion-btn-icon-transition
);
}
#toast-container
{
width
:
100%
;
top
:
30px
;
...
...
@@ -75,6 +76,39 @@
background-color
:
rgba
(
255
,
255
,
255
,
0.7
);
}
/* Override Toastr Styles to Look Like PrimeNG Toast */
.toast
{
background
:
var
(
--surface-card
);
/* Matches PrimeNG's background */
border
:
1px
solid
var
(
--surface-border
);
/* Matches PrimeNG's border */
box-shadow
:
0
2px
4px
rgba
(
0
,
0
,
0
,
0.1
);
/* Subtle shadow */
border-radius
:
4px
;
/* Rounded corners */
color
:
var
(
--text-color
);
/* Matches PrimeNG's text color */
font-family
:
'Arial'
,
sans-serif
;
/* Matches PrimeNG's font */
margin-bottom
:
1rem
;
padding
:
1rem
;
width
:
300px
;
/* PrimeNG's default width */
}
.toast-message
{
display
:
flex
;
align-items
:
center
;
}
.toast-message
.toast-title
{
font-weight
:
bold
;
margin-bottom
:
0.5rem
;
}
.toast-message
.toast-body
{
margin
:
0
;
}
.toast-close-button
{
color
:
var
(
--text-color-secondary
);
/* Matches PrimeNG's close button color */
}
/*--------------------------------------------------------------
# General
--------------------------------------------------------------*/
...
...
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