Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Luciano Barletta
/
TicketTech
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 36ad6129
authored
2020-03-02 09:05:01 -0300
by
Georgina Mondino
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of
http://git.anacsoft.com/Lusho/TicketTech
2 parents
ce7775e3
fef86573
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
51 additions
and
12 deletions
src/app/app-routing.module.ts
src/app/app.module.ts
src/app/busqueda/busqueda.component.ts
src/app/nav-bar/nav-bar.component.css
src/app/nav-bar/nav-bar.component.html
src/app/nav-bar/nav-bar.component.ts
src/app/app-routing.module.ts
View file @
36ad612
...
...
@@ -7,7 +7,7 @@ import { BusquedaComponent } from './busqueda/busqueda.component';
const
routes
:
Routes
=
[
{
path
:
''
,
component
:
MainComponent
},
{
path
:
'informacion/:id'
,
component
:
InformacionComponent
},
{
path
:
'busqueda'
,
component
:
BusquedaComponent
}
{
path
:
'busqueda
/:search
'
,
component
:
BusquedaComponent
}
];
/* { path: '**', component: PageNotFoundComponent } */
...
...
src/app/app.module.ts
View file @
36ad612
...
...
@@ -9,6 +9,7 @@ import { NavBarComponent } from './nav-bar/nav-bar.component';
import
{
InformacionComponent
}
from
'./informacion/informacion.component'
;
import
{
ImagesService
}
from
'./services/images.service'
;
import
{
BusquedaComponent
}
from
'./busqueda/busqueda.component'
;
import
{
FormsModule
}
from
'@angular/forms'
;
@
NgModule
({
declarations
:
[
...
...
@@ -21,7 +22,8 @@ import { BusquedaComponent } from './busqueda/busqueda.component';
],
imports
:
[
BrowserModule
,
AppRoutingModule
AppRoutingModule
,
FormsModule
],
providers
:
[
ImagesService
],
bootstrap
:
[
AppComponent
]
...
...
src/app/busqueda/busqueda.component.ts
View file @
36ad612
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
ActivatedRoute
,
ParamMap
}
from
'@angular/router'
;
@
Component
({
selector
:
'app-busqueda'
,
...
...
@@ -7,12 +8,18 @@ import { Component, OnInit } from '@angular/core';
})
export
class
BusquedaComponent
implements
OnInit
{
search
:
string
;
order
:
string
=
"Asc"
;
results
:
any
[];
constructor
()
{
}
constructor
(
private
route
:
ActivatedRoute
)
{
}
ngOnInit
():
void
{
this
.
route
.
paramMap
.
subscribe
(
(
params
)
=>
this
.
search
=
params
.
get
(
'search'
)
);
this
.
results
=
[
"Cosa1"
,
"Cosa2"
,
...
...
@@ -25,6 +32,6 @@ export class BusquedaComponent implements OnInit {
}
change
()
{
this
.
order
=
=
"Asc"
?
"Des"
:
"Asc"
;
this
.
order
=
(
this
.
order
==
"Asc"
?
"Des"
:
"Asc"
)
;
}
}
src/app/nav-bar/nav-bar.component.css
View file @
36ad612
...
...
@@ -38,3 +38,14 @@
border-radius
:
10px
;
}
.NavSuggestion
{
background-color
:
white
;
border
:
solid
1px
grey
;
position
:
absolute
;
width
:
30%
;
left
:
70%
;
padding
:
3px
;
top
:
0
;
transform
:
translate
(
-50%
,
220%
);
}
src/app/nav-bar/nav-bar.component.html
View file @
36ad612
...
...
@@ -6,10 +6,13 @@
<img
class=
"NavLogo"
src=
"assets/images/LogoProv2.png"
style=
"height: auto; width: 250px;"
>
</a>
<div
class=
"NavSearchContainer"
>
<input
class=
"NavInput"
type=
"text"
placeholder=
"Search.."
>
<a
routerLink=
"/busqueda"
>
<input
[(
ngModel
)]="
search
"
(
keyup
)="
showinput
()"
(
keydown
)="
hideinput
()"
class=
"NavInput"
type=
"text"
placeholder=
"Search.."
>
<a
routerLink=
"/busqueda
/{{ search }}
"
>
<i
class=
"fas fa-search fa-2x"
style=
"color:white;"
></i>
</a>
<div
*
ngIf=
"suggestion"
class=
"NavSuggestion"
>
<i>
buscar {{ search }}
</i>
</div>
</div>
<a
href=
"javascript:"
routerLink=
"/"
>
<i
class=
"fas fa-user-circle fa-3x"
style=
"color:white;"
></i>
...
...
src/app/nav-bar/nav-bar.component.ts
View file @
36ad612
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Observable
,
interval
}
from
'rxjs'
;
import
{
switchMap
,
take
}
from
'rxjs/operators'
;
@
Component
({
selector
:
'nav-bar'
,
templateUrl
:
'./nav-bar.component.html'
,
styleUrls
:
[
'./nav-bar.component.css'
]
selector
:
'nav-bar'
,
templateUrl
:
'./nav-bar.component.html'
,
styleUrls
:
[
'./nav-bar.component.css'
]
})
export
class
NavBarComponent
implements
OnInit
{
constructor
()
{
}
search
:
string
=
''
;
suggestion
:
boolean
=
false
;
ngOnInit
():
void
{
}
constructor
()
{
}
ngOnInit
():
void
{
}
showinput
()
{
interval
(
1000
).
pipe
(
take
(
1
)
)
.
subscribe
(
()
=>
this
.
suggestion
=
true
);
}
hideinput
()
{
this
.
suggestion
=
false
;
}
}
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment