Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
HIAST-Clinics
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
almohanad.hafez
HIAST-Clinics
Commits
49d2f2e6
Commit
49d2f2e6
authored
Aug 22, 2024
by
Almouhannad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(F) Add list doctor users
parent
a77ca208
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
103 additions
and
20 deletions
+103
-20
app.module.ts
Clinics.Frontend/src/app/app.module.ts
+3
-1
doctor-user.ts
...p/usecases/admin/list-doctor-users/classes/doctor-user.ts
+4
-0
get-all-doctor-users-response.ts
...ist-doctor-users/classes/get-all-doctor-users-response.ts
+5
-0
get-all-doctor-users-result.ts
.../list-doctor-users/classes/get-all-doctor-users-result.ts
+15
-0
doctor-user.component.html
...r-users/components/doctor-user/doctor-user.component.html
+2
-2
doctor-user.component.ts
...tor-users/components/doctor-user/doctor-user.component.ts
+6
-1
doctor-users.component.html
...users/components/doctor-users/doctor-users.component.html
+2
-14
doctor-users.component.ts
...r-users/components/doctor-users/doctor-users.component.ts
+26
-2
doctor-users.service.ts
...d/src/app/usecases/admin/services/doctor-users.service.ts
+40
-0
No files found.
Clinics.Frontend/src/app/app.module.ts
View file @
49d2f2e6
...
...
@@ -22,6 +22,7 @@ import { TestSignalRComponent } from './notifications/components/test-signal-r/t
import
{
SignalRService
}
from
'./notifications/services/signal-r.service'
;
import
{
DoctorUsersComponent
}
from
'./usecases/admin/list-doctor-users/components/doctor-users/doctor-users.component'
;
import
{
DoctorUserComponent
}
from
'./usecases/admin/list-doctor-users/components/doctor-user/doctor-user.component'
;
import
{
DoctorUsersService
}
from
'./usecases/admin/services/doctor-users.service'
;
@
NgModule
({
...
...
@@ -43,7 +44,8 @@ import { DoctorUserComponent } from './usecases/admin/list-doctor-users/componen
providers
:
[
AuthenticationService
,
{
provide
:
HTTP_INTERCEPTORS
,
useClass
:
AuthenticationInterceptor
,
multi
:
true
},
SignalRService
SignalRService
,
DoctorUsersService
,
],
// components and directives that belong to this module
...
...
Clinics.Frontend/src/app/usecases/admin/list-doctor-users/classes/doctor-user.ts
0 → 100644
View file @
49d2f2e6
export
class
DoctorUser
{
public
userName
!
:
string
;
public
fullName
!
:
string
;
}
\ No newline at end of file
Clinics.Frontend/src/app/usecases/admin/list-doctor-users/classes/get-all-doctor-users-response.ts
0 → 100644
View file @
49d2f2e6
import
{
DoctorUser
}
from
"./doctor-user"
;
export
class
GetAllDoctorUsersResponse
{
public
doctorUsers
:
DoctorUser
[];
}
\ No newline at end of file
Clinics.Frontend/src/app/usecases/admin/list-doctor-users/classes/get-all-doctor-users-result.ts
0 → 100644
View file @
49d2f2e6
import
{
DoctorUser
}
from
"./doctor-user"
;
export
class
GetAllDoctorUsersResult
{
constructor
(
status
:
boolean
,
errorMessage
?:
string
,
doctorUsers
?:
DoctorUser
[])
{
this
.
status
=
status
;
this
.
errorMessage
=
errorMessage
;
this
.
doctorUsers
=
doctorUsers
;
}
public
status
!
:
boolean
;
public
errorMessage
?:
string
;
public
doctorUsers
?:
DoctorUser
[];
}
\ No newline at end of file
Clinics.Frontend/src/app/usecases/admin/list-doctor-users/components/doctor-user/doctor-user.component.html
View file @
49d2f2e6
...
...
@@ -8,7 +8,7 @@
<!-- #region Name-->
<div
class=
"mb-3"
class=
"custom-user-full-name"
>
<h3>
د.
رغدان عدنان ربيع
</h3>
<h3>
د.
{{doctorUser.fullName}}
</h3>
</div>
<!-- #endregion -->
...
...
@@ -16,7 +16,7 @@
<div
class=
"custom-user-data mb-4 mt-4"
>
<span>
اسم المستخدم:
</span>
<span>
almouhannad.hafez
</span>
<span>
{{doctorUser.userName}}
</span>
</div>
<!-- #endregion -->
...
...
Clinics.Frontend/src/app/usecases/admin/list-doctor-users/components/doctor-user/doctor-user.component.ts
View file @
49d2f2e6
import
{
Component
}
from
'@angular/core'
;
import
{
Component
,
Input
}
from
'@angular/core'
;
import
{
DoctorUser
}
from
'../../classes/doctor-user'
;
@
Component
({
selector
:
'app-doctor-user'
,
...
...
@@ -7,4 +8,8 @@ import { Component } from '@angular/core';
})
export
class
DoctorUserComponent
{
// #region Inputs
@
Input
(
"doctorUser"
)
doctorUser
:
DoctorUser
;
// #endregion
}
Clinics.Frontend/src/app/usecases/admin/list-doctor-users/components/doctor-users/doctor-users.component.html
View file @
49d2f2e6
...
...
@@ -20,20 +20,8 @@
<!-- #region container-->
<div
class=
"container"
>
<div
class=
"row gy-5 "
>
<div
class=
"col-lg-4 col-md-6"
>
<app-doctor-user></app-doctor-user>
</div>
<div
class=
"col-lg-4 col-md-6"
>
<app-doctor-user></app-doctor-user>
</div>
<div
class=
"col-lg-4 col-md-6"
>
<app-doctor-user></app-doctor-user>
</div>
<div
class=
"col-lg-4 col-md-6"
>
<app-doctor-user></app-doctor-user>
</div>
<div
class=
"col-lg-4 col-md-6"
>
<app-doctor-user></app-doctor-user>
<div
*
ngFor=
"let doctorUser of doctorUsers"
class=
"col-lg-4 col-md-6"
>
<app-doctor-user
[
doctorUser
]="
doctorUser
"
></app-doctor-user>
</div>
</div>
</div>
...
...
Clinics.Frontend/src/app/usecases/admin/list-doctor-users/components/doctor-users/doctor-users.component.ts
View file @
49d2f2e6
import
{
Component
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
DoctorUsersService
}
from
'../../../services/doctor-users.service'
;
import
{
DoctorUser
}
from
'../../classes/doctor-user'
;
import
{
ToastrService
}
from
'ngx-toastr'
;
import
{
GetAllDoctorUsersResult
}
from
'../../classes/get-all-doctor-users-result'
;
@
Component
({
selector
:
'app-doctor-users'
,
templateUrl
:
'./doctor-users.component.html'
,
styleUrl
:
'./doctor-users.component.css'
})
export
class
DoctorUsersComponent
{
export
class
DoctorUsersComponent
implements
OnInit
{
// #region CTOR DI
constructor
(
private
doctorUsersService
:
DoctorUsersService
,
private
toastrService
:
ToastrService
)
{}
// #endregion
// #region On init
ngOnInit
():
void
{
this
.
doctorUsersService
.
getDoctorUsers
()
.
subscribe
((
getAllDoctorUsersResult
:
GetAllDoctorUsersResult
)
=>
{
if
(
getAllDoctorUsersResult
.
status
)
this
.
doctorUsers
=
getAllDoctorUsersResult
.
doctorUsers
!
;
else
this
.
toastrService
.
error
(
getAllDoctorUsersResult
.
errorMessage
!
);
})
}
// #endregion
// #region Variables
doctorUsers
:
DoctorUser
[];
// #endregion
}
Clinics.Frontend/src/app/usecases/admin/services/doctor-users.service.ts
0 → 100644
View file @
49d2f2e6
import
{
Injectable
}
from
'@angular/core'
;
import
{
HttpClient
,
HttpErrorResponse
}
from
'@angular/common/http'
;
import
{
catchError
,
map
,
Observable
,
of
}
from
'rxjs'
;
import
*
as
config
from
'../../../../../config'
;
import
{
DoctorUser
}
from
'../list-doctor-users/classes/doctor-user'
;
import
{
GetAllDoctorUsersResult
}
from
'../list-doctor-users/classes/get-all-doctor-users-result'
;
import
{
GetAllDoctorUsersResponse
}
from
'../list-doctor-users/classes/get-all-doctor-users-response'
;
@
Injectable
({
providedIn
:
'root'
})
export
class
DoctorUsersService
{
// #region DI CTOR
constructor
(
private
http
:
HttpClient
)
{
}
// #endregion
// #region Constants
private
readonly
DOCTORUSERS_ENDPOINT
:
string
=
`
${
config
.
apiUrl
}
/Users/Doctors`
;
// #endregion
// #region Methods
// #region Get all doctor users
getDoctorUsers
():
Observable
<
GetAllDoctorUsersResult
>
{
return
this
.
http
.
get
<
GetAllDoctorUsersResponse
>
(
this
.
DOCTORUSERS_ENDPOINT
)
.
pipe
(
map
((
getAllDoctorUsersResponse
:
GetAllDoctorUsersResponse
)
=>
{
return
new
GetAllDoctorUsersResult
(
true
,
''
,
getAllDoctorUsersResponse
.
doctorUsers
);
}),
catchError
((
error
:
HttpErrorResponse
)
=>
{
return
of
(
new
GetAllDoctorUsersResult
(
false
,
error
.
error
.
detail
))
})
)
}
// #endregion
// #endregion
}
\ 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