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
9b05c995
Commit
9b05c995
authored
Aug 23, 2024
by
Almouhannad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(F) Edit update page
parent
123aa6d2
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
139 additions
and
12 deletions
+139
-12
create-doctor-user-form.component.css
...te-doctor-user-form/create-doctor-user-form.component.css
+28
-0
create-doctor-user-form.component.html
...e-doctor-user-form/create-doctor-user-form.component.html
+13
-7
doctor-users.service.ts
...d/src/app/usecases/admin/services/doctor-users.service.ts
+16
-0
doctor-user-response.ts
.../admin/update-doctor-user/classes/doctor-user-response.ts
+9
-0
update-doctor-user.component.css
...nents/update-doctor-user/update-doctor-user.component.css
+28
-0
update-doctor-user.component.html
...ents/update-doctor-user/update-doctor-user.component.html
+12
-1
update-doctor-user.component.ts
...onents/update-doctor-user/update-doctor-user.component.ts
+33
-4
No files found.
Clinics.Frontend/src/app/usecases/admin/create-doctor-user/components/create-doctor-user-form/create-doctor-user-form.component.css
View file @
9b05c995
...
...
@@ -78,6 +78,34 @@
}
/* #endregion */
/* #region Back-button*/
.custom-back-button
{
margin-bottom
:
1em
;
}
.custom-back-button
a
{
width
:
50%
;
}
.custom-back-button
a
.btn
{
width
:
50%
;
background-color
:
var
(
--accent-color
);
color
:
white
;
border-color
:
var
(
--accent-color
);
font-weight
:
700
;
}
.custom-back-button
a
button
:hover
{
background-color
:
white
;
border-color
:
var
(
--accent-color
);
color
:
var
(
--accent-color
);
}
.custom-back-button
a
.btn
i
{
margin-right
:
0.5em
;
}
/* #endregion */
/* #region Field*/
.custom-field
{
...
...
Clinics.Frontend/src/app/usecases/admin/create-doctor-user/components/create-doctor-user-form/create-doctor-user-form.component.html
View file @
9b05c995
...
...
@@ -2,7 +2,19 @@
<section
class=
"section"
>
<div
dir=
"rtl"
class=
"mb-5 custom-form"
>
<div
class=
"container text-center mb-3"
>
<div
class=
"custom-back-button"
>
<a
[
routerLink
]="['..']"
>
<button
class=
"btn btn-outline-primary"
>
عودة
<i
class=
"bi bi-arrow-left"
></i>
</button>
</a>
</div>
</div>
<!-- #region Title-->
<div
class=
"text-center custom-form-title mb-4"
>
<h3
style=
"font-weight: 800;"
>
إضافة طبيب
</h3>
</div>
...
...
@@ -251,13 +263,7 @@
حفظ
<i
class=
"bi bi-save"
></i>
</button>
<a
[
routerLink
]="['..']"
>
<button
type=
"button"
class=
"btn btn-outline-primary"
>
عودة
<i
class=
"bi bi-arrow-left"
></i>
</button>
</a>
</div>
</div>
</div>
...
...
Clinics.Frontend/src/app/usecases/admin/services/doctor-users.service.ts
View file @
9b05c995
...
...
@@ -6,6 +6,7 @@ import { GetAllDoctorUsersResult } from '../list-doctor-users/classes/get-all-do
import
{
GetAllDoctorUsersResponse
}
from
'../list-doctor-users/classes/get-all-doctor-users-response'
;
import
{
CreateDoctorUserCommand
}
from
'../create-doctor-user/classes/create-doctor-user-command'
;
import
{
CreateDoctorUserResult
}
from
'../create-doctor-user/classes/create-doctor-user-result'
;
import
{
DoctorUserResponse
}
from
'../update-doctor-user/classes/doctor-user-response'
;
@
Injectable
({
providedIn
:
'root'
...
...
@@ -51,5 +52,20 @@ export class DoctorUsersService {
}
// #endregion
// #region Get doctor user by Id
getDoctorUserById
(
id
:
number
):
Observable
<
DoctorUserResponse
|
null
>
{
return
this
.
http
.
get
<
DoctorUserResponse
>
(
`
${
this
.
DOCTORUSERS_ENDPOINT
}
/
${
id
}
`
)
.
pipe
(
map
((
doctorUser
:
DoctorUserResponse
)
=>
{
return
doctorUser
;
}),
catchError
((
error
:
HttpErrorResponse
)
=>
{
return
of
(
null
);
})
)
}
// #endregion
// #endregion
}
\ No newline at end of file
Clinics.Frontend/src/app/usecases/admin/update-doctor-user/classes/doctor-user-response.ts
0 → 100644
View file @
9b05c995
export
class
DoctorUserResponse
{
public
id
!
:
number
;
public
userName
!
:
string
;
public
firstName
!
:
string
;
public
middleName
!
:
string
;
public
lastName
!
:
string
;
}
\ No newline at end of file
Clinics.Frontend/src/app/usecases/admin/update-doctor-user/components/update-doctor-user/update-doctor-user.component.css
View file @
9b05c995
/* #region Custom*/
.custom-back-button
{
margin-bottom
:
1em
;
}
.custom-back-button
a
{
width
:
100%
;
}
.custom-back-button
a
.btn
{
width
:
100%
;
background-color
:
var
(
--accent-color
);
color
:
white
;
border-color
:
var
(
--accent-color
);
font-weight
:
700
;
}
.custom-back-button
a
button
:hover
{
background-color
:
white
;
border-color
:
var
(
--accent-color
);
color
:
var
(
--accent-color
);
}
.custom-back-button
a
.btn
i
{
margin-right
:
0.5em
;
}
/* #endregion */
/* #region Accordion*/
.accordion
{
margin-bottom
:
1em
;
...
...
Clinics.Frontend/src/app/usecases/admin/update-doctor-user/components/update-doctor-user/update-doctor-user.component.html
View file @
9b05c995
<div
class=
"custom-child"
dir=
"rtl"
>
<section
class=
"section"
>
<!-- #region Title -->
<div
class=
"container text-center mb-3 custom-title"
>
<div
class=
"custom-back-button"
>
<a
[
routerLink
]="['../..']"
>
<button
class=
"btn btn-outline-primary"
>
عودة
<i
class=
"bi bi-arrow-left"
></i>
</button>
</a>
</div>
<h2>
تعديل بيانات الطبيب
</h2>
<h2>
اسم الطبيب الثلاثي
</h2>
<h2>
{{getUserFullName()}}
</h2>
</div>
<!-- #endregion -->
...
...
Clinics.Frontend/src/app/usecases/admin/update-doctor-user/components/update-doctor-user/update-doctor-user.component.ts
View file @
9b05c995
import
{
Component
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
DoctorUsersService
}
from
'../../../services/doctor-users.service'
;
import
{
DoctorUserResponse
}
from
'../../classes/doctor-user-response'
;
import
{
ActivatedRoute
}
from
'@angular/router'
;
@
Component
({
selector
:
'app-update-doctor-user'
,
templateUrl
:
'./update-doctor-user.component.html'
,
styleUrl
:
'./update-doctor-user.component.css'
})
export
class
UpdateDoctorUserComponent
{
export
class
UpdateDoctorUserComponent
implements
OnInit
{
// #region Variables
// #region CTOR DI
constructor
(
private
doctorUsersService
:
DoctorUsersService
,
private
route
:
ActivatedRoute
){}
// #endregion
// #region On init
ngOnInit
():
void
{
this
.
doctorUserId
=
Number
(
this
.
route
.
snapshot
.
paramMap
.
get
(
'id'
));
this
.
doctorUsersService
.
getDoctorUserById
(
this
.
doctorUserId
)
.
subscribe
(
doctorUser
=>
{
this
.
doctorUser
=
doctorUser
!
;
}
)
}
// #endregion
// #region Variables
doctorUserId
:
number
;
doctorUser
:
DoctorUserResponse
;
isUserDataSelected
:
boolean
=
false
;
isPersonalInfoSelected
:
boolean
=
false
;
// #endregion
// #endregion
// #region Methods
public
getUserFullName
():
string
{
return
`
${
this
.
doctorUser
.
firstName
}
${
this
.
doctorUser
.
middleName
}
${
this
.
doctorUser
.
lastName
}
`
}
// #endregion
}
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