Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TFG
Manage
Activity
Members
Automate
Agent sessions
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
paborte
TFG
Commits
231135d8
Commit
231135d8
authored
Jun 14, 2022
by
paborte
Browse files
Options
Downloads
Patches
Plain Diff
Cambios menores
parent
bcdec3fe
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/contacto/contacto.component.ts
+6
-3
6 additions, 3 deletions
src/app/contacto/contacto.component.ts
src/app/shared/services/database.service.ts
+7
-9
7 additions, 9 deletions
src/app/shared/services/database.service.ts
with
13 additions
and
12 deletions
src/app/contacto/contacto.component.ts
+
6
−
3
View file @
231135d8
...
@@ -17,9 +17,9 @@ export class ContactoComponent implements OnInit {
...
@@ -17,9 +17,9 @@ export class ContactoComponent implements OnInit {
contacto
(
form
:
NgForm
)
{
contacto
(
form
:
NgForm
)
{
this
.
envioCorrecto
=
true
;
this
.
envioCorrecto
=
true
;
form
.
reset
();
form
.
reset
();
let
interval
=
setTimeout
(()
=>
{
/*
let interval = setTimeout(() => {
this.envioCorrecto = !this.envioCorrecto;
this.envioCorrecto = !this.envioCorrecto;
},
2500
);
}, 2500);
*/
this
.
databaseService
this
.
databaseService
.
createConsultaInDatabase
(
.
createConsultaInDatabase
(
form
.
value
.
nombre
,
form
.
value
.
nombre
,
...
@@ -30,7 +30,10 @@ export class ContactoComponent implements OnInit {
...
@@ -30,7 +30,10 @@ export class ContactoComponent implements OnInit {
form
.
value
.
motivoConsulta
form
.
value
.
motivoConsulta
)
)
.
then
(
.
then
(
(
resolve
)
=>
{},
(
resolve
)
=>
{
this
.
envioCorrecto
=
true
;
console
.
log
(
resolve
);
},
(
reject
)
=>
{}
(
reject
)
=>
{}
);
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/app/shared/services/database.service.ts
+
7
−
9
View file @
231135d8
...
@@ -76,8 +76,7 @@ export class DatabaseService {
...
@@ -76,8 +76,7 @@ export class DatabaseService {
numeroDePedido
:
string
,
numeroDePedido
:
string
,
motivoConsulta
:
string
motivoConsulta
:
string
)
{
)
{
return
new
Promise
<
any
>
((
resolve
,
reject
)
=>
{
return
this
.
angularFirestore
.
collection
(
'
consultas
'
).
doc
().
set
({
this
.
angularFirestore
.
collection
(
'
consultas
'
).
doc
().
set
({
nombre
:
nombre
,
nombre
:
nombre
,
apellidos
:
apellidos
,
apellidos
:
apellidos
,
email
:
email
,
email
:
email
,
...
@@ -85,7 +84,6 @@ export class DatabaseService {
...
@@ -85,7 +84,6 @@ export class DatabaseService {
numeroDePedido
:
numeroDePedido
,
numeroDePedido
:
numeroDePedido
,
motivoConsulta
:
motivoConsulta
,
motivoConsulta
:
motivoConsulta
,
});
});
});
}
}
getProductoFromDatabase
(
productoID
:
string
):
Observable
<
any
>
{
getProductoFromDatabase
(
productoID
:
string
):
Observable
<
any
>
{
return
this
.
angularFirestore
return
this
.
angularFirestore
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment