Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
alloreparWeb
Project
Overview
Details
Activity
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
amal
alloreparWeb
Commits
69ca81f1
Commit
69ca81f1
authored
Nov 11, 2019
by
amalk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11-11-2019
parent
b4e6cdc4
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
190 additions
and
41 deletions
+190
-41
README.md
README.md
+1
-1
angular.json
angular.json
+12
-11
app.e2e-spec.ts
e2e/src/app.e2e-spec.ts
+1
-1
package-lock.json
package-lock.json
+1
-1
package.json
package.json
+1
-1
app.component.spec.ts
src/app/components/app/app.component.spec.ts
+3
-3
home.component.html
src/app/components/app/home/desktop/home.component.html
+25
-9
home.component.scss
src/app/components/app/home/desktop/home.component.scss
+3
-0
home.component.ts
src/app/components/app/home/desktop/home.component.ts
+23
-1
home.component.html
src/app/components/app/home/mobile/home.component.html
+25
-9
home.component.ts
src/app/components/app/home/mobile/home.component.ts
+88
-2
app.desktop.module.ts
src/app/modules/app.desktop.module.ts
+2
-0
app.mobile.module.ts
src/app/modules/app.mobile.module.ts
+2
-0
app.module.ts
src/app/modules/app.module.ts
+1
-0
karma.conf.js
src/karma.conf.js
+2
-2
No files found.
README.md
View file @
69ca81f1
#
B2cNew
#
Allorepar
This project was generated with
[
Angular CLI
](
https://github.com/angular/angular-cli
)
version 7.3.8.
...
...
angular.json
View file @
69ca81f1
{
"$schema"
:
"./node_modules/@angular/cli/lib/config/schema.json"
,
"version"
:
1
,
"newProjectRoot"
:
"
a
llorepar"
,
"newProjectRoot"
:
"
A
llorepar"
,
"projects"
:
{
"
a
llorepar"
:
{
"
A
llorepar"
:
{
"root"
:
""
,
"sourceRoot"
:
"src"
,
"projectType"
:
"application"
,
...
...
@@ -17,7 +17,7 @@
"build"
:
{
"builder"
:
"@angular-devkit/build-angular:browser"
,
"options"
:
{
"outputPath"
:
"dist/
a
llorepar"
,
"outputPath"
:
"dist/
A
llorepar"
,
"index"
:
"src/index.html"
,
"main"
:
"src/main.ts"
,
"polyfills"
:
"src/polyfills.ts"
,
...
...
@@ -63,18 +63,18 @@
"serve"
:
{
"builder"
:
"@angular-devkit/build-angular:dev-server"
,
"options"
:
{
"browserTarget"
:
"
a
llorepar:build"
"browserTarget"
:
"
A
llorepar:build"
},
"configurations"
:
{
"production"
:
{
"browserTarget"
:
"
a
llorepar:build:production"
"browserTarget"
:
"
A
llorepar:build:production"
}
}
},
"extract-i18n"
:
{
"builder"
:
"@angular-devkit/build-angular:extract-i18n"
,
"options"
:
{
"browserTarget"
:
"
a
llorepar:build"
"browserTarget"
:
"
A
llorepar:build"
}
},
"test"
:
{
...
...
@@ -85,7 +85,7 @@
"tsConfig"
:
"src/tsconfig.spec.json"
,
"karmaConfig"
:
"src/karma.conf.js"
,
"styles"
:
[
"src/styles.scss"
,
"src/styles.scss"
],
"scripts"
:
[],
"assets"
:
[
...
...
@@ -108,7 +108,7 @@
}
}
},
"
a
llorepar-e2e"
:
{
"
A
llorepar-e2e"
:
{
"root"
:
"e2e/"
,
"projectType"
:
"application"
,
"prefix"
:
""
,
...
...
@@ -117,11 +117,11 @@
"builder"
:
"@angular-devkit/build-angular:protractor"
,
"options"
:
{
"protractorConfig"
:
"e2e/protractor.conf.js"
,
"devServerTarget"
:
"
a
llorepar:serve"
"devServerTarget"
:
"
A
llorepar:serve"
},
"configurations"
:
{
"production"
:
{
"devServerTarget"
:
"
a
llorepar:serve:production"
"devServerTarget"
:
"
A
llorepar:serve:production"
}
}
},
...
...
@@ -137,5 +137,5 @@
}
}
},
"defaultProject"
:
"
a
llorepar"
"defaultProject"
:
"
A
llorepar"
}
\ No newline at end of file
e2e/src/app.e2e-spec.ts
View file @
69ca81f1
...
...
@@ -10,7 +10,7 @@ describe('workspace-project App', () => {
it
(
'should display welcome message'
,
()
=>
{
page
.
navigateTo
();
expect
(
page
.
getTitleText
()).
toEqual
(
'Welcome to
b2cNew
!'
);
expect
(
page
.
getTitleText
()).
toEqual
(
'Welcome to
Allorepar
!'
);
});
afterEach
(
async
()
=>
{
...
...
package-lock.json
View file @
69ca81f1
{
"name"
:
"
a
llorepar"
,
"name"
:
"
A
llorepar"
,
"version"
:
"0.0.0"
,
"lockfileVersion"
:
1
,
"requires"
:
true
,
...
...
package.json
View file @
69ca81f1
{
"name"
:
"
a
llorepar
"
,
"name"
:
"
A
llorepar
"
,
"version"
:
"0.0.0"
,
"scripts"
:
{
"ng"
:
"ng"
,
...
...
src/app/components/app/app.component.spec.ts
View file @
69ca81f1
...
...
@@ -20,16 +20,16 @@ describe('AppComponent', () => {
expect
(
app
).
toBeTruthy
();
});
it
(
`should have as title '
b2cNew
'`
,
()
=>
{
it
(
`should have as title '
Allorepar
'`
,
()
=>
{
const
fixture
=
TestBed
.
createComponent
(
AppComponent
);
const
app
=
fixture
.
debugElement
.
componentInstance
;
expect
(
app
.
title
).
toEqual
(
'
b2cNew
'
);
expect
(
app
.
title
).
toEqual
(
'
Allorepar
'
);
});
it
(
'should render title in a h1 tag'
,
()
=>
{
const
fixture
=
TestBed
.
createComponent
(
AppComponent
);
fixture
.
detectChanges
();
const
compiled
=
fixture
.
debugElement
.
nativeElement
;
expect
(
compiled
.
querySelector
(
'h1'
).
textContent
).
toContain
(
'Welcome to
b2cNew
!'
);
expect
(
compiled
.
querySelector
(
'h1'
).
textContent
).
toContain
(
'Welcome to
Allorepar
!'
);
});
});
src/app/components/app/home/desktop/home.component.html
View file @
69ca81f1
...
...
@@ -128,25 +128,41 @@
<div
class=
"col-md-6"
>
<div
class=
"contact_right_container"
fxLayout=
"column"
fxLayoutAlign=
"center start"
>
<div
class=
"contact_form"
>
<div
class=
"contact_row"
>
<form
[
formGroup
]="
registerForm
"
(
ngSubmit
)="
onSubmit
()"
>
<div
class=
"contact_row form-group"
>
<p>
Name
</p>
<input
class=
""
type=
"text"
>
<input
type=
"text"
formControlName=
"Name"
class=
"form-control"
[
ngClass
]="{
'
is-invalid
'
:
submitted
&&
f
.
Name
.
errors
}"
/>
<div
*
ngIf=
"submitted && f.Name.errors"
class=
"invalid-feedback"
>
<div
*
ngIf=
"f.Name.errors.required"
>
Name is required
</div>
</div>
<div
class=
"contact_row"
>
</div>
<div
class=
"contact_row form-group"
>
<p>
Email Address
</p>
<input
class=
""
type=
"mail"
>
<input
type=
"mail"
formControlName=
"email"
class=
"form-control"
[
ngClass
]="{
'
is-invalid
'
:
submitted
&&
f
.
email
.
errors
}"
/>
<div
*
ngIf=
"submitted && f.email.errors"
class=
"invalid-feedback"
>
<div
*
ngIf=
"f.email.errors.required"
>
Email is required
</div>
<div
*
ngIf=
"f.email.errors.email"
>
Email must be a valid email address
</div>
</div>
</div>
<div
class=
"contact_row
"
>
<div
class=
"contact_row form-group
"
>
<p>
Phone Number
</p>
<input
class=
""
type=
"number"
>
<input
type=
"number"
formControlName=
"Number"
class=
"form-control"
[
ngClass
]="{
'
is-invalid
'
:
submitted
&&
f
.
Number
.
errors
}"
/>
<div
*
ngIf=
"submitted && f.Number.errors"
class=
"invalid-feedback"
>
<div
*
ngIf=
"f.Number.errors.required"
>
Phone Number required
</div>
</div>
<div
class=
"contact_row"
>
</div>
<div
class=
"contact_row form-group"
>
<p>
Comments
</p>
<textarea
class=
""
type=
"number"
rows=
"8"
></textarea>
<textarea
type=
"text"
rows=
"8"
formControlName=
"Comment"
class=
"form-control"
[
ngClass
]="{
'
is-invalid
'
:
submitted
&&
f
.
Comment
.
errors
}"
>
</textarea>
<div
*
ngIf=
"submitted && f.Comment.errors"
class=
"invalid-feedback"
>
<div
*
ngIf=
"f.Comment.errors.required"
>
Comment is required
</div>
</div>
</div>
<div
class=
"contact_row
"
>
<div
class=
"contact_row form-group
"
>
<button
mat-button
class=
"login_btn"
>
submit
</button>
</div>
</form>
</div>
</div>
</div>
...
...
src/app/components/app/home/desktop/home.component.scss
View file @
69ca81f1
...
...
@@ -314,6 +314,9 @@ section.module.parallax {
height
:
100vh
;
.contact_form
{
width
:
80%
;
.form-group
{
margin-bottom
:
0px
!
important
;
}
.contact_row
{
padding-bottom
:
40px
;
p
{
...
...
src/app/components/app/home/desktop/home.component.ts
View file @
69ca81f1
...
...
@@ -3,6 +3,7 @@ import { Component, OnInit, HostListener } from '@angular/core';
import
{
MaterialModule
}
from
'../../../../modules/material.module'
;
import
{
NgAnimateScrollService
}
from
'ng-animate-scroll'
;
import
{
FormBuilder
,
FormGroup
,
Validators
}
from
'@angular/forms'
;
declare
var
$
;
...
...
@@ -24,10 +25,12 @@ declare const window: any;
export
class
HomeComponent
implements
OnInit
{
registerForm
:
FormGroup
;
submitted
=
false
;
menuActive
:
any
;
isShow
:
any
;
constructor
(
private
animateScrollService
:
NgAnimateScrollService
)
{
constructor
(
private
animateScrollService
:
NgAnimateScrollService
,
private
formBuilder
:
FormBuilder
)
{
this
.
menuActive
=
1
;
this
.
isShow
=
1
;
...
...
@@ -50,6 +53,25 @@ export class HomeComponent implements OnInit {
}
ngOnInit
()
{
this
.
registerForm
=
this
.
formBuilder
.
group
({
Name
:
[
''
,
Validators
.
required
],
email
:
[
''
,
[
Validators
.
required
,
Validators
.
email
]],
Number
:
[
''
,
[
Validators
.
required
,
Validators
.
minLength
(
6
)]],
Comment
:
[
''
,
Validators
.
required
],
});
}
get
f
()
{
return
this
.
registerForm
.
controls
;
}
onSubmit
()
{
this
.
submitted
=
true
;
// stop here if form is invalid
if
(
this
.
registerForm
.
invalid
)
{
return
;
}
alert
(
'SUCCESS!! :-)
\
n
\
n'
+
JSON
.
stringify
(
this
.
registerForm
.
value
))
}
...
...
src/app/components/app/home/mobile/home.component.html
View file @
69ca81f1
...
...
@@ -128,25 +128,41 @@
<div
class=
"col-md-6"
>
<div
class=
"contact_right_container"
fxLayout=
"column"
fxLayoutAlign=
"center start"
>
<div
class=
"contact_form"
>
<div
class=
"contact_row"
>
<form
[
formGroup
]="
registerForm
"
(
ngSubmit
)="
onSubmit
()"
>
<div
class=
"contact_row form-group"
>
<p>
Name
</p>
<input
class=
""
type=
"text"
>
<input
type=
"text"
formControlName=
"Name"
class=
"form-control"
[
ngClass
]="{
'
is-invalid
'
:
submitted
&&
f
.
Name
.
errors
}"
/>
<div
*
ngIf=
"submitted && f.Name.errors"
class=
"invalid-feedback"
>
<div
*
ngIf=
"f.Name.errors.required"
>
Name is required
</div>
</div>
<div
class=
"contact_row"
>
</div>
<div
class=
"contact_row form-group"
>
<p>
Email Address
</p>
<input
class=
""
type=
"mail"
>
<input
type=
"mail"
formControlName=
"email"
class=
"form-control"
[
ngClass
]="{
'
is-invalid
'
:
submitted
&&
f
.
email
.
errors
}"
/>
<div
*
ngIf=
"submitted && f.email.errors"
class=
"invalid-feedback"
>
<div
*
ngIf=
"f.email.errors.required"
>
Email is required
</div>
<div
*
ngIf=
"f.email.errors.email"
>
Email must be a valid email address
</div>
</div>
</div>
<div
class=
"contact_row
"
>
<div
class=
"contact_row form-group
"
>
<p>
Phone Number
</p>
<input
class=
""
type=
"number"
>
<input
type=
"number"
formControlName=
"Number"
class=
"form-control"
[
ngClass
]="{
'
is-invalid
'
:
submitted
&&
f
.
Number
.
errors
}"
/>
<div
*
ngIf=
"submitted && f.Number.errors"
class=
"invalid-feedback"
>
<div
*
ngIf=
"f.Number.errors.required"
>
Phone Number required
</div>
</div>
<div
class=
"contact_row"
>
</div>
<div
class=
"contact_row form-group"
>
<p>
Comments
</p>
<textarea
class=
""
type=
"number"
rows=
"8"
></textarea>
<textarea
type=
"text"
rows=
"8"
formControlName=
"Comment"
class=
"form-control"
[
ngClass
]="{
'
is-invalid
'
:
submitted
&&
f
.
Comment
.
errors
}"
>
</textarea>
<div
*
ngIf=
"submitted && f.Comment.errors"
class=
"invalid-feedback"
>
<div
*
ngIf=
"f.Comment.errors.required"
>
Comment is required
</div>
</div>
</div>
<div
class=
"contact_row
"
>
<div
class=
"contact_row form-group
"
>
<button
mat-button
class=
"login_btn"
>
submit
</button>
</div>
</form>
</div>
</div>
</div>
...
...
src/app/components/app/home/mobile/home.component.ts
View file @
69ca81f1
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
NgModule
}
from
'@angular/core'
;
import
{
Component
,
OnInit
,
HostListener
}
from
'@angular/core'
;
import
{
MaterialModule
}
from
'../../../../modules/material.module'
;
import
{
NgAnimateScrollService
}
from
'ng-animate-scroll'
;
import
{
FormBuilder
,
FormGroup
,
Validators
}
from
'@angular/forms'
;
declare
var
$
;
declare
const
window
:
any
;
@
NgModule
({
imports
:
[
MaterialModule
]
})
@
Component
({
selector
:
'app-home'
,
templateUrl
:
'./home.component.html'
,
styleUrls
:
[
'./home.component.scss'
]
})
export
class
HomeComponent
implements
OnInit
{
constructor
()
{
}
registerForm
:
FormGroup
;
submitted
=
false
;
menuActive
:
any
;
isShow
:
any
;
constructor
(
private
animateScrollService
:
NgAnimateScrollService
,
private
formBuilder
:
FormBuilder
)
{
this
.
menuActive
=
1
;
this
.
isShow
=
1
;
}
toHome
(
duration
?:
number
)
{
this
.
animateScrollService
.
scrollToElement
(
'home'
,
duration
);
this
.
menuActive
=
1
;
}
toAboutus
(
duration
?:
number
)
{
this
.
animateScrollService
.
scrollToElement
(
'aboutus'
,
duration
);
this
.
menuActive
=
2
;
}
toContact
(
duration
?:
number
)
{
this
.
animateScrollService
.
scrollToElement
(
'contact'
,
duration
);
this
.
menuActive
=
3
;
}
ngOnInit
()
{
this
.
registerForm
=
this
.
formBuilder
.
group
({
Name
:
[
''
,
Validators
.
required
],
email
:
[
''
,
[
Validators
.
required
,
Validators
.
email
]],
Number
:
[
''
,
[
Validators
.
required
,
Validators
.
minLength
(
6
)]],
Comment
:
[
''
,
Validators
.
required
],
});
}
get
f
()
{
return
this
.
registerForm
.
controls
;
}
onSubmit
()
{
this
.
submitted
=
true
;
// stop here if form is invalid
if
(
this
.
registerForm
.
invalid
)
{
return
;
}
alert
(
'SUCCESS!! :-)
\
n
\
n'
+
JSON
.
stringify
(
this
.
registerForm
.
value
))
}
@
HostListener
(
'window:scroll'
,
[])
onWindowScroll
()
{
const
number
=
window
.
pageYOffset
||
document
.
documentElement
.
scrollTop
||
document
.
body
.
scrollTop
||
0
;
$
(
window
).
scroll
(
function
()
{
const
sticky
=
$
(
'.navbar'
),
scroll
=
$
(
window
).
scrollTop
();
if
(
scroll
>
10
)
{
sticky
.
addClass
(
'scrolled_navbar'
);
}
else
{
sticky
.
removeClass
(
'scrolled_navbar'
);
}
});
}
user
()
{
this
.
isShow
=
1
;
}
mechanic
()
{
this
.
isShow
=
2
;
}
}
src/app/modules/app.desktop.module.ts
View file @
69ca81f1
...
...
@@ -2,6 +2,7 @@
import
{
NgModule
}
from
'@angular/core'
;
import
{
CommonModule
}
from
'@angular/common'
;
import
{
ReactiveFormsModule
}
from
'@angular/forms'
;
/*-- IMPORTED-ROUTING-MODULES --*/
...
...
@@ -23,6 +24,7 @@ import { HomeComponent } from '../components/app/home/desktop/home.component';
imports
:
[
CommonModule
,
MaterialModule
,
ReactiveFormsModule
,
FlexLayoutModule
,
AppDesktopRoutingModule
...
...
src/app/modules/app.mobile.module.ts
View file @
69ca81f1
...
...
@@ -2,6 +2,7 @@
import
{
NgModule
}
from
'@angular/core'
;
import
{
CommonModule
}
from
'@angular/common'
;
import
{
ReactiveFormsModule
}
from
'@angular/forms'
;
/*-- IMPORTED-ROUTING-MODULES --*/
...
...
@@ -24,6 +25,7 @@ import { HomeComponent } from '../components/app/home/mobile/home.component';
CommonModule
,
MaterialModule
,
FlexLayoutModule
,
ReactiveFormsModule
,
AppMobileRoutingModule
],
...
...
src/app/modules/app.module.ts
View file @
69ca81f1
...
...
@@ -4,6 +4,7 @@ import { NgModule } from '@angular/core';
import
{
BrowserModule
}
from
'@angular/platform-browser'
;
import
{
BrowserAnimationsModule
}
from
'@angular/platform-browser/animations'
;
/*-- IMPORTED-ROUTING-MODULES --*/
import
{
AppRoutingModule
}
from
'./app-routing.module'
;
...
...
src/karma.conf.js
View file @
69ca81f1
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module
.
exports
=
function
(
config
)
{
module
.
exports
=
function
(
config
)
{
config
.
set
({
basePath
:
''
,
frameworks
:
[
'jasmine'
,
'@angular-devkit/build-angular'
],
...
...
@@ -16,7 +16,7 @@ module.exports = function (config) {
clearContext
:
false
// leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter
:
{
dir
:
require
(
'path'
).
join
(
__dirname
,
'../coverage/b2cNew
'
),
dir
:
require
(
'path'
).
join
(
__dirname
,
'../coverage/Allorepar
'
),
reports
:
[
'html'
,
'lcovonly'
,
'text-summary'
],
fixWebpackSourcePaths
:
true
},
...
...
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