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
ad5cc854
You need to sign in or sign up before continuing.
Commit
ad5cc854
authored
Aug 21, 2024
by
Almouhannad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(F) Set login form
parent
c241dcc5
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
128 additions
and
24 deletions
+128
-24
app.module.ts
Clinics.Frontend/src/app/app.module.ts
+2
-0
login-command.ts
....Frontend/src/app/classes/Authentication/login-command.ts
+5
-0
login-form.component.css
...onents/Authentication/login-form/login-form.component.css
+21
-0
login-form.component.html
...nents/Authentication/login-form/login-form.component.html
+64
-1
login-form.component.ts
...ponents/Authentication/login-form/login-form.component.ts
+17
-1
home.component.html
Clinics.Frontend/src/app/components/home/home.component.html
+14
-21
tsconfig.json
Clinics.Frontend/tsconfig.json
+5
-1
No files found.
Clinics.Frontend/src/app/app.module.ts
View file @
ad5cc854
...
...
@@ -12,6 +12,7 @@ import { HeaderComponent } from './components/template/header/header.component';
import
{
FooterComponent
}
from
'./components/template/footer/footer.component'
;
import
{
HomeComponent
}
from
'./components/home/home.component'
;
import
{
LoginFormComponent
}
from
'./components/Authentication/login-form/login-form.component'
;
import
{
FormsModule
}
from
'@angular/forms'
;
@
NgModule
({
imports
:
[
...
...
@@ -20,6 +21,7 @@ import { LoginFormComponent } from './components/Authentication/login-form/login
AppRoutingModule
,
NgbModule
,
ToastrModule
.
forRoot
(),
FormsModule
,
],
// creators of services that this module contributes to the
...
...
Clinics.Frontend/src/app/classes/Authentication/login-command.ts
0 → 100644
View file @
ad5cc854
export
class
LoginCommand
{
public
userName
!
:
string
;
public
password
!
:
string
;
}
Clinics.Frontend/src/app/components/Authentication/login-form/login-form.component.css
View file @
ad5cc854
.custom-input
,
.custom-input
::placeholder
{
color
:
var
(
--heading-color
);
}
.custom-input
::placeholder
{
opacity
:
40%
;
}
.custom-label
{
color
:
var
(
--heading-color
);
font-weight
:
700
;
}
.custom-cancel-button
{
color
:
var
(
--heading-color
);
}
.custom-cancel-button
:hover
{
color
:
white
;
background-color
:
var
(
--heading-color
);
}
\ No newline at end of file
Clinics.Frontend/src/app/components/Authentication/login-form/login-form.component.html
View file @
ad5cc854
<p>
login-form works!
</p>
<div
class=
"custom-child"
dir=
"rtl"
>
<div>
<div
class=
"text-center"
>
<h3
style=
"font-weight: 800;"
>
تسجيل الدخول
</h3>
</div>
<hr>
<form
#
loginForm=
"ngForm"
(
ngSubmit
)="
onSubmit
()"
class=
"text-center"
autocomplete=
"off"
>
<!-- To avoid first field auto focus -->
<div
class=
"form-group"
>
<input
type=
"text"
autofocus=
"autofocus"
style=
"display:none"
/>
</div>
<div
class=
"form-group mb-4"
>
<label
for=
"username"
class=
"col-form-label custom-label mb-2"
>
اسم المستخدم
<span
class=
"text-danger"
>
*
</span></label>
<input
type=
"text"
class=
"form-control text-center custom-input"
placeholder=
"ادخل اسم المستخدم"
dir=
"ltr"
[(
ngModel
)]="
formModel
.
userName
"
name=
"userName"
#
userName=
"ngModel"
required
maxlength=
"50"
>
<div
*
ngIf=
"(userName.touched || userName.dirty) && userName.errors"
class=
"mt-2"
>
<span
class=
"text-danger"
>
{{
userName.errors['required'] ? 'هذا الحقل مطلوب'
: ''
}}
</span>
</div>
</div>
<div
class=
"form-group mb-4"
>
<label
for=
"password"
class=
"col-form-label custom-label mb-2"
>
كلمة المرور
<span
class=
"text-danger"
>
*
</span></label>
<input
type=
"password"
class=
"form-control text-center custom-input mb-2"
placeholder=
"ادخل كلمة المرور"
dir=
"ltr"
[(
ngModel
)]="
formModel
.
password
"
name=
"password"
#
password=
"ngModel"
required
maxlength=
"50"
>
<div
*
ngIf=
"(password.touched || password.dirty) && password.errors"
class=
"mt-2"
>
<span
class=
"text-danger"
>
{{
password.errors['required'] ? 'هذا الحقل مطلوب'
: ''
}}
</span>
</div>
</div>
<div
class=
"d-grid gap-3"
>
<button
type=
"submit"
class=
"btn btn-outline-primary"
[
disabled
]="!
loginForm
.
dirty
||
loginForm
.
invalid
"
>
دخول
</button>
<button
type=
"button"
class=
"btn btn-outline-secondary custom-cancel-button"
(
click
)="
parentModal
.
dismiss
()"
>
الغاء
</button>
</div>
</form>
</div>
</div>
\ No newline at end of file
Clinics.Frontend/src/app/components/Authentication/login-form/login-form.component.ts
View file @
ad5cc854
import
{
Component
}
from
'@angular/core'
;
import
{
Component
,
Input
,
ViewChild
}
from
'@angular/core'
;
import
{
NgForm
}
from
'@angular/forms'
;
import
{
LoginCommand
}
from
'../../../classes/Authentication/login-command'
;
@
Component
({
selector
:
'app-login-form'
,
...
...
@@ -7,4 +9,18 @@ import { Component } from '@angular/core';
})
export
class
LoginFormComponent
{
//#region Inputs
@
Input
(
"parentModal"
)
parentModal
:
any
;
//#endregion
//#region Variables
@
ViewChild
(
"loginForm"
)
loginForm
:
NgForm
;
formModel
:
LoginCommand
=
new
LoginCommand
();
//#endregion
//#region On submit
onSubmit
():
void
{}
//#endregion
}
Clinics.Frontend/src/app/components/home/home.component.html
View file @
ad5cc854
...
...
@@ -10,7 +10,7 @@
<div
class=
"welcome position-relative"
>
<h2
style=
"margin-left: 0.5em"
>
المركز الطبي
</h2>
<br>
<p
style=
"font-weight: 500; color:var(--heading-color);"
>
لدى
مركز الدراسات والبحوث العلمية
</p>
<p
style=
"font-weight: 500; color:var(--heading-color);"
>
في
مركز الدراسات والبحوث العلمية
</p>
</div>
<div
class=
"content row gy-4"
>
...
...
@@ -91,9 +91,9 @@
<h4>
د. أحمد حافظ
</h4>
<span>
اخصائي جراحة وجه وفكين
</span>
<div
class=
"social"
>
<a
href=
""
><i
class=
"bi bi-telephone"
></i></a>
<a
href=
""
><i
class=
"bi bi-envelope"
></i></a>
<a
href=
""
><i
class=
"bi bi-whatsapp"
></i></a>
<a><i
class=
"bi bi-telephone"
></i></a>
<a><i
class=
"bi bi-envelope"
></i></a>
<a><i
class=
"bi bi-whatsapp"
></i></a>
</div>
</div>
</div>
...
...
@@ -106,9 +106,9 @@
<h4>
د. زهراء كنجو
</h4>
<span>
اخصائية تغذية
</span>
<div
class=
"social"
>
<a
href=
""
><i
class=
"bi bi-telephone"
></i></a>
<a
href=
""
><i
class=
"bi bi-envelope"
></i></a>
<a
href=
""
><i
class=
"bi bi-whatsapp"
></i></a>
<a><i
class=
"bi bi-telephone"
></i></a>
<a><i
class=
"bi bi-envelope"
></i></a>
<a><i
class=
"bi bi-whatsapp"
></i></a>
</div>
</div>
</div>
...
...
@@ -121,9 +121,9 @@
<h4>
د. رغدان ربيع
</h4>
<span>
اخصائي أمراض قلبية
</span>
<div
class=
"social"
>
<a
href=
""
><i
class=
"bi bi-telephone"
></i></a>
<a
href=
""
><i
class=
"bi bi-envelope"
></i></a>
<a
href=
""
><i
class=
"bi bi-whatsapp"
></i></a>
<a><i
class=
"bi bi-telephone"
></i></a>
<a><i
class=
"bi bi-envelope"
></i></a>
<a><i
class=
"bi bi-whatsapp"
></i></a>
</div>
</div>
</div>
...
...
@@ -136,9 +136,9 @@
<h4>
د. شام محمد
</h4>
<span>
اخصائية علاج فيزيائي
</span>
<div
class=
"social"
>
<a
href=
""
><i
class=
"bi bi-telephone"
></i></a>
<a
href=
""
><i
class=
"bi bi-envelope"
></i></a>
<a
href=
""
><i
class=
"bi bi-whatsapp"
></i></a>
<a><i
class=
"bi bi-telephone"
></i></a>
<a><i
class=
"bi bi-envelope"
></i></a>
<a><i
class=
"bi bi-whatsapp"
></i></a>
</div>
</div>
</div>
...
...
@@ -201,16 +201,9 @@
<!-- #region login pop-up -->
<ng-template
#
loginModal
let-modal
>
<div
class=
"modal-header"
>
<h4
class=
"modal-title"
id=
"modal-basic-title"
>
تسجيل الدخول
</h4>
<button
type=
"button"
class=
"btn-close"
data-bs-dismiss=
"modal"
aria-label=
"Close"
(
click
)="
modal
.
dismiss
('
Cross
click
')"
></button>
</div>
<div
class=
"modal-body"
>
<app-login-form></app-login-form>
<app-login-form
[
parentModal
]="
modal
"
></app-login-form>
</div>
<!-- <div class="modal-footer">
</div> -->
</ng-template>
<!-- #endregion -->
...
...
Clinics.Frontend/tsconfig.json
View file @
ad5cc854
...
...
@@ -5,6 +5,10 @@
"compilerOptions"
:
{
"outDir"
:
"./dist/out-tsc"
,
"strict"
:
true
,
//
To
avoid
initialization
of
properties
in
classes
"strictPropertyInitialization"
:
false
,
"noImplicitOverride"
:
true
,
"noPropertyAccessFromIndexSignature"
:
true
,
"noImplicitReturns"
:
true
,
...
...
@@ -29,4 +33,4 @@
"strictInputAccessModifiers"
:
true
,
"strictTemplates"
:
true
}
}
}
\ 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