Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
appcocha2019ios
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Juan Pablo
appcocha2019ios
Commits
0b79e396
Commit
0b79e396
authored
Jan 25, 2019
by
Trino Parra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
formulario
parent
8487c1a8
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
3620 additions
and
130 deletions
+3620
-130
.vscode/plugins.json
.vscode/plugins.json
+1
-0
.vscode/typings/cordova-ionic/plugins/keyboard.d.ts
.vscode/typings/cordova-ionic/plugins/keyboard.d.ts
+41
-0
.vscode/typings/jquery/jquery.d.ts
.vscode/typings/jquery/jquery.d.ts
+3208
-0
src/pages/formulary/formulary.html
src/pages/formulary/formulary.html
+45
-0
src/pages/formulary/formulary.module.ts
src/pages/formulary/formulary.module.ts
+13
-0
src/pages/formulary/formulary.scss
src/pages/formulary/formulary.scss
+89
-0
src/pages/formulary/formulary.ts
src/pages/formulary/formulary.ts
+89
-0
src/pages/inquiry/inquiry.html
src/pages/inquiry/inquiry.html
+48
-49
src/pages/inquiry/inquiry.scss
src/pages/inquiry/inquiry.scss
+59
-53
src/pages/inquiry/inquiry.ts
src/pages/inquiry/inquiry.ts
+1
-24
src/pages/menu/menu.ts
src/pages/menu/menu.ts
+8
-4
src/providers/rest/rest.ts
src/providers/rest/rest.ts
+18
-0
No files found.
.vscode/plugins.json
0 → 100644
View file @
0b79e396
{
"plugins"
:[
"cordova-plugin-whitelist"
,
"cordova-plugin-device"
,
"call-number"
,
"cordova-plugin-statusbar"
,
"cordova-plugin-disable-ios11-statusbar"
,
"cordova-sqlite-storage"
,
"cordova-plugin-fcm"
,
"phonegap-plugin-push"
,
"cordova-plugin-console"
,
"cordova-plugin-actionsheet"
,
"cordova-plugin-camera"
,
"cordova-plugin-file"
,
"cordova-plugin-file-transfer"
,
"cordova-plugin-network-information"
,
"cordova-plugin-app-preferences"
,
"com-badrit-base64"
,
"cordova-plugin-filechooser"
,
"cordova-plugin-android-permissions"
,
"cordova.plugins.diagnostic"
,
"cordova-plugin-ionic-keyboard"
,
"cordova-plugin-splashscreen"
,
"cordova-plugin-headercolor"
,
"cordova-plugin-file-opener2"
,
"cordova-plugin-screen-orientation"
]}
\ No newline at end of file
.vscode/typings/cordova-ionic/plugins/keyboard.d.ts
0 → 100644
View file @
0b79e396
// Type definitions for Cordova Keyboard plugin
// Project: https://github.com/driftyco/ionic-plugins-keyboard
// Definitions by: Hendrik Maus <https://github.com/hendrikmaus>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare
module
Ionic
{
interface
Keyboard
{
/**
* Hide the keyboard accessory bar with the next, previous and done buttons.
*
* @param hide
*/
hideKeyboardAccessoryBar
(
hide
:
boolean
):
void
;
/**
* Close the keyboard if it is open.
*/
close
():
void
;
/**
* Force keyboard to be shown on Android.
* This typically helps if autofocus on a text element does not pop up the keyboard automatically
*
* Supported Platforms: Android, Blackberry 10
*/
show
():
void
;
/**
* Disable native scrolling, useful if you are using JavaScript to scroll
*
* @param disbale
*/
disableScroll
(
disbale
:
boolean
):
void
;
/**
* Whether or not the keyboard is currently visible.
*/
isVisible
:
boolean
;
}
}
.vscode/typings/jquery/jquery.d.ts
0 → 100644
View file @
0b79e396
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/pages/formulary/formulary.html
0 → 100644
View file @
0b79e396
<ion-header>
<ion-navbar>
</ion-navbar>
</ion-header>
<ion-content
padding
style=
"background-color: #F3F4F6"
>
<img
src=
"assets/imgs/Marqueta/logo.png"
class=
"center headerimg"
>
<br
/>
<h6
class=
"header6"
>
En estos momentos nuestros ejecutivos se encuentran ocupados, por favor indiquenos su requerimiento y nuestro equipo se contactara con usted lo más pronto posible.
</h6>
<br
/>
<form
[formGroup]=
"messageForm"
class=
"list center-form"
*ngIf=
"isSchema()"
>
<ion-item>
<ion-label
stacked
>
{{shema.formulario[0].nombre}}
</ion-label>
<ion-select
formControlName=
"request"
*ngIf=
"isSchema()"
placeholder=
"Seleccione una opcion"
>
<ion-option
*ngFor=
"let req of shema.formulario[0].opciones"
[value]=
"req"
>
{{req}}
</ion-option>
</ion-select>
</ion-item>
<br
/>
<ion-item>
<ion-label
stacked
>
{{shema.formulario[1].nombre}}
</ion-label>
<ion-textarea
*ngIf=
"shema.formulario[1].tipo=='text'"
class=
"mensajebox"
formControlName=
"message"
type=
"text"
[maxlength]=
"shema.formulario[1].largo"
></ion-textarea>
<!--<ion-textarea class="mensajebox" formControlName="message" type="text" maxlength="450"></ion-textarea>-->
</ion-item>
<br
/>
<div
class=
"error-message"
>
{{error}}
</div>
<br
/>
<button
ion-button
type=
"button"
[disabled]=
"!messageForm.valid"
(click)=
"enviar()"
class=
"center btn"
>
enviar
</button>
</form>
<ion-footer
class=
"footer hideElementOnKeyboardShown hide-on-keyboard-open applyFooter"
>
<a
href=
"http://gearlabs.cl/"
onclick=
"window.open(this.href, '_blank', 'location=no'); return false;"
><img
class=
"footerlogo"
src=
"assets/imgs/Marqueta/paer.png"
></a>
</ion-footer>
</ion-content>
\ No newline at end of file
src/pages/formulary/formulary.module.ts
0 → 100644
View file @
0b79e396
import
{
NgModule
}
from
'
@angular/core
'
;
import
{
IonicPageModule
}
from
'
ionic-angular
'
;
import
{
FormularyPage
}
from
'
./formulary
'
;
@
NgModule
({
declarations
:
[
FormularyPage
,
],
imports
:
[
IonicPageModule
.
forChild
(
FormularyPage
),
],
})
export
class
FormularyPageModule
{}
src/pages/formulary/formulary.scss
0 → 100644
View file @
0b79e396
page-formulary
{
.center
{
display
:
block
;
margin-left
:
auto
;
margin-right
:
auto
;
width
:
40%
!
important
;
}
.mensajebox
{
height
:
100px
;
}
.headerimg
{
margin-top
:
10px
;
}
.header6
{
text-align
:
center
;
color
:
#787879
;
font-weight
:
400
;
}
.btn
{
border-radius
:
20px
;
width
:
50%
;
overflow
:
hidden
;
height
:
3
.6rem
;
font-size
:
16px
;
font-weight
:
400
;
font-variant
:
small-caps
;
color
:
#fff
;
background-color
:
#CB0D12
;
box-shadow
:
0
2px
2px
0
rgba
(
0
,
0
,
0
,
0
.14
)
,
0
3px
1px
-2px
rgba
(
0
,
0
,
0
,
0
.2
)
,
0
1px
5px
0
rgba
(
0
,
0
,
0
,
0
.12
);
}
.btn
:hover
{
background-color
:
transparent
!
important
;
}
.container
.btn
:hover
{
background-color
:
#008B7D
;
}
.itemclr
{
background-color
:
#F2F2F2
;
max-width
:
96%
;
}
.ion-input
:hover
{
background-color
:
#CB0D12
;
}
.item-input
.label-ios
,
.item-select
.label-ios
,
.item-datetime
.label-ios
{
color
:
#424242
;
}
.item-input
.label-md
,
.item-select
.label-md
,
.item-datetime
.label-md
{
color
:
#424242
;
}
.item-input
.label-wp
,
.item-select
.label-wp
,
.item-datetime
.label-wp
{
color
:
#424242
;
}
.button-md.activated
{
background-color
:
#CB0D12
;
}
.button-ios.activated
{
background-color
:
#CB0D12
;
}
.button-wp.activated
{
background-color
:
#CB0D12
;
}
.btn
:hover
{
background-color
:
#CB0D12
!
important
;
}
.label-md
[
stacked
]
{
font-size
:
16px
!
important
;
}
.label-ios
[
stacked
]
{
font-size
:
16px
!
important
;
}
.label-wp
[
stacked
]
{
font-size
:
16px
!
important
;
}
.footer
{
position
:
fixed
;
left
:
0
;
bottom
:
0px
;
width
:
100%
;
padding-left
:
15%
;
padding-right
:
15%
}
$list-ios-activated-background-color
:
#CB0D12
;
$list-md-activated-background-color
:
#CB0D12
;
$list-wp-activated-background-color
:
#CB0D12
;
}
src/pages/formulary/formulary.ts
0 → 100644
View file @
0b79e396
import
{
Component
}
from
'
@angular/core
'
;
import
{
IonicPage
,
NavController
,
NavParams
}
from
'
ionic-angular
'
;
import
{
FormBuilder
,
FormGroup
,
Validators
}
from
'
@angular/forms
'
;
import
{
RestProvider
}
from
'
../../providers/rest/rest
'
;
import
{
Loader
}
from
"
../../providers/loader/loader
"
;
import
{
Storage
}
from
'
@ionic/storage
'
;
import
{
AlertController
}
from
'
ionic-angular
'
;
@
IonicPage
()
@
Component
({
selector
:
'
page-formulary
'
,
templateUrl
:
'
formulary.html
'
,
})
export
class
FormularyPage
{
public
messageForm
:
FormGroup
;
shema
:
any
;
rut
:
any
;
error
:
any
=
''
;
constructor
(
public
navCtrl
:
NavController
,
public
navParams
:
NavParams
,
private
formBuilder
:
FormBuilder
,
public
restProvider
:
RestProvider
,
private
alertCtrl
:
AlertController
,
private
loader
:
Loader
,
public
storage
:
Storage
)
{
this
.
messageForm
=
formBuilder
.
group
({
message
:
[
''
,
Validators
.
compose
([
Validators
.
required
])],
request
:
[
''
,
Validators
.
compose
([
Validators
.
required
])]
});
}
ionViewDidLoad
()
{
console
.
log
(
'
ionViewDidLoad FormularyPage
'
);
this
.
storage
.
get
(
'
rut
'
).
then
((
rut
)
=>
{
this
.
rut
=
rut
;
});
this
.
restProvider
.
getCofiguration
().
then
(
msg
=>
{
console
.
log
(
msg
[
'
formularioJson
'
]);
this
.
shema
=
msg
[
'
formularioJson
'
][
'
formularioJson
'
];
});
}
isSchema
(){
return
this
.
shema
&&
this
.
shema
.
formulario
&&
this
.
shema
.
formulario
.
length
>
0
;
//return this.shema && this.shema.formulario;
}
enviar
()
{
console
.
log
(
"
Enviando....
"
);
this
.
error
=
''
;
//this.loader.show('Please Wait');
let
message
:
any
=
this
.
messageForm
.
value
.
message
;
let
request
:
any
=
this
.
messageForm
.
value
.
request
;
if
(
!
message
||
message
==
''
||
message
.
length
==
0
)
{
//this.loader.hide();
let
alert
=
this
.
alertCtrl
.
create
({
subTitle
:
'
Por favor ingrese un mensaje
'
,
buttons
:
[
'
Aceptar
'
]
});
alert
.
present
();
}
else
if
(
!
request
||
request
==
''
||
request
.
length
==
0
){
this
.
loader
.
hide
();
let
alert
=
this
.
alertCtrl
.
create
({
subTitle
:
'
Por favor indique el tipo de requerimiento
'
,
buttons
:
[
'
Aceptar
'
]
});
alert
.
present
();
}
else
{
//console.log('pot data: ' + this.rut + " request: " + request + " message: " + message);
this
.
restProvider
.
save_form
(
this
.
rut
,
request
,
message
).
then
(
data
=>
{
console
.
log
(
'
resp:
'
+
data
);
//this.loader.hide();
let
alert
=
this
.
alertCtrl
.
create
({
subTitle
:
'
Su solicitud fue recibida, en breve lo atenderemos!
'
,
buttons
:
[
'
Aceptar
'
]
});
alert
.
present
();
this
.
goback
();
}).
catch
(
error
=>
{
this
.
loader
.
hide
();
this
.
error
=
error
.
error
[
'
error
'
];
console
.
log
(
"
error2:
"
+
this
.
error
);
});
}
}
goback
()
{
this
.
navCtrl
.
pop
();
}
}
src/pages/inquiry/inquiry.html
View file @
0b79e396
<ion-content
style=
"background-color: #F3F4F6"
>
<ion-content
style=
"background-color: #F3F4F6"
>
<img
src=
"assets/imgs/Marqueta/logo.png"
class=
"center headerimg"
>
<br
/>
<br
/>
<h6
class=
"header6"
>
Encuesta
</h6>
<h6
class=
"header6"
>
Encuesta
</h6>
<form
novalidate
class=
"list center-form"
>
<form
novalidate
class=
"list center-form"
>
<ion-grid>
<ion-grid>
<ion-row>
<ion-row>
<ion-col
col-12
col-xl-12
>
<ion-col
col-12
col-xl-12
>
<ion-label><div
class=
"star-container"
align=
"center"
*ngIf=
"shema[1
].tituloPregunta"
>
{{shema[0].tituloPregunta}}
</div></ion-label>
<ion-label><div
class=
"star-container"
align=
"center"
*ngIf=
"shema[0
].tituloPregunta"
>
{{shema[0].tituloPregunta}}
</div></ion-label>
</ion-col>
</ion-col>
</ion-row>
</ion-row>
<ion-row
class=
"borderdrop"
>
<ion-row
class=
"borderdrop"
>
<ion-col
col-12
col-xl-12
>
<ion-col
col-12
col-xl-12
>
<ion-item>
<div
class=
"star star-container"
align=
"center"
>
<div
class=
"star star-container"
align=
"center"
>
<button
class=
"star"
*ngFor=
"let star of stars; index as i"
(click)=
"refreshStars(i);"
>
<button
class=
"star"
*ngFor=
"let star of stars; index as i"
(click)=
"refreshStars(i);"
>
<img
[src]=
"getStarType(star)"
/>
<img
[src]=
"getStarType(star)"
width=
"44px"
height=
"44px"
/>
</button>
</button>
</div>
</div>
</ion-item>
</ion-col>
</ion-col>
</ion-row>
</ion-row>
<ion-row>
<ion-row>
...
@@ -25,17 +27,13 @@
...
@@ -25,17 +27,13 @@
</ion-row>
</ion-row>
<ion-row
class=
"borderdrop"
radio-group
[(ngModel)]=
"siNo"
name=
"res2"
*ngIf=
"shema"
>
<ion-row
class=
"borderdrop"
radio-group
[(ngModel)]=
"siNo"
name=
"res2"
*ngIf=
"shema"
>
<ion-col
col-2
col-xl-2
></ion-col>
<ion-col
col-2
col-xl-2
></ion-col>
<ion-col
col-4
col-xl-4
>
<ion-col
col-4
col-xl-4
style=
"margin:15px"
>
<ion-item>
<ion-label
style=
"display: inline"
*ngIf=
"shema[1].opcionesPregunta[0].textoOpcion"
>
{{shema[1].opcionesPregunta[0].textoOpcion}}
</ion-label>
<ion-label
*ngIf=
"shema[1].opcionesPregunta[0].textoOpcion"
>
{{shema[1].opcionesPregunta[0].textoOpcion}}
</ion-label>
<ion-radio
style=
"vertical-align:middle"
value=
"0"
></ion-radio>
<ion-radio
value=
"0"
></ion-radio>
</ion-item>
</ion-col>
</ion-col>
<ion-col
col-4
col-xl-4
>
<ion-col
col-4
col-xl-4
style=
"margin:15px"
>
<ion-item>
<ion-label
style=
"display: inline"
*ngIf=
"shema[1].opcionesPregunta[1].textoOpcion"
>
{{shema[1].opcionesPregunta[1].textoOpcion}}
</ion-label>
<ion-label
*ngIf=
"shema[1].opcionesPregunta[1].textoOpcion"
>
{{shema[1].opcionesPregunta[1].textoOpcion}}
</ion-label>
<ion-radio
style=
"vertical-align:middle"
value=
"1"
></ion-radio>
<ion-radio
value=
"1"
></ion-radio>
</ion-item>
</ion-col>
</ion-col>
<ion-col
col-2
col-xl-2
></ion-col>
<ion-col
col-2
col-xl-2
></ion-col>
</ion-row>
</ion-row>
...
@@ -48,4 +46,5 @@
...
@@ -48,4 +46,5 @@
<ion-footer
class=
"footer hideElementOnKeyboardShown hide-on-keyboard-open applyFooter"
>
<ion-footer
class=
"footer hideElementOnKeyboardShown hide-on-keyboard-open applyFooter"
>
<a
href=
"http://gearlabs.cl/"
onclick=
"window.open(this.href, '_blank', 'location=no'); return false;"
><img
class=
"footerlogo"
src=
"assets/imgs/Marqueta/paer1.png"
></a>
<a
href=
"http://gearlabs.cl/"
onclick=
"window.open(this.href, '_blank', 'location=no'); return false;"
><img
class=
"footerlogo"
src=
"assets/imgs/Marqueta/paer1.png"
></a>
</ion-footer>
</ion-footer>
</ion-content>
</ion-content>
\ No newline at end of file
src/pages/inquiry/inquiry.scss
View file @
0b79e396
...
@@ -2,6 +2,9 @@ page-inquiry {
...
@@ -2,6 +2,9 @@ page-inquiry {
.title1
{
.title1
{
color
:
#F41D15
;
color
:
#F41D15
;
}
}
.headerimg
{
margin-top
:
50px
;
}
.maincontent
{
.maincontent
{
height
:
95vh
;
height
:
95vh
;
padding
:
30px
!
important
;
padding
:
30px
!
important
;
...
@@ -41,8 +44,12 @@ page-inquiry {
...
@@ -41,8 +44,12 @@ page-inquiry {
.borderdrop
{
.borderdrop
{
background
:
white
!
important
;
background
:
white
!
important
;
border-radius
:
20px
;
border-radius
:
20px
;
height
:
60px
;
//border-bottom: 1px solid #C5C5C5;
//border-bottom: 1px solid #C5C5C5;
}
}
.noborder
{
border-bottom
:
0px
white
!
important
}
.footer
{
.footer
{
position
:
fixed
;
position
:
fixed
;
left
:
0
;
left
:
0
;
...
@@ -51,5 +58,4 @@ page-inquiry {
...
@@ -51,5 +58,4 @@ page-inquiry {
padding-left
:
15%
;
padding-left
:
15%
;
padding-right
:
15%
padding-right
:
15%
}
}
}
}
\ No newline at end of file
\ No newline at end of file
src/pages/inquiry/inquiry.ts
View file @
0b79e396
...
@@ -4,14 +4,6 @@ import { MenuPage } from '../../pages/menu/menu';
...
@@ -4,14 +4,6 @@ import { MenuPage } from '../../pages/menu/menu';
import
{
RestProvider
,
UserInfo
}
from
'
../../providers/rest/rest
'
;
import
{
RestProvider
,
UserInfo
}
from
'
../../providers/rest/rest
'
;
import
{
AlertController
}
from
'
ionic-angular
'
;
import
{
AlertController
}
from
'
ionic-angular
'
;
import
{
Storage
}
from
'
@ionic/storage
'
;
import
{
Storage
}
from
'
@ionic/storage
'
;
import
{
single
}
from
'
rxjs/operators
'
;
/**
* Generated class for the InquiryPage page.
*
* See https://ionicframework.com/docs/components/#navigation for more info on
* Ionic pages and navigation.
*/
@
IonicPage
()
@
IonicPage
()
@
Component
({
@
Component
({
...
@@ -56,23 +48,9 @@ export class InquiryPage {
...
@@ -56,23 +48,9 @@ export class InquiryPage {
this
.
getcompanyLogo
=
getcompanyLogo
;
this
.
getcompanyLogo
=
getcompanyLogo
;
});
});
/*let parser = new DOMParser();
let parsedHtml = parser.parseFromString(this.inquiryTest, 'text/html');
let questions = parsedHtml.getElementsByTagName("span");
if (questions.length > 1) {
this.question1 = questions[0].innerHTML;
this.question2 = questions[1].innerHTML;
}*/
//this.N = parsedHtml.getElementsByClassName("rating__icon").length;
this
.
stars
=
new
Array
<
string
>
(
this
.
shema
[
0
].
opcionesPregunta
.
length
-
1
);
this
.
stars
=
new
Array
<
string
>
(
this
.
shema
[
0
].
opcionesPregunta
.
length
-
1
);
for
(
var
i
=
0
;
i
<
this
.
shema
[
0
].
opcionesPregunta
.
length
-
1
;
i
++
)
{
this
.
stars
[
i
]
=
"
star
"
;
}
for
(
var
i
=
0
;
i
<
this
.
shema
[
0
].
opcionesPregunta
.
length
-
1
;
i
++
)
{
this
.
stars
[
i
]
=
"
star
"
;
}
console
.
log
(
'
construct InquiryPage 2
'
);
/*let inputs = parsedHtml.getElementsByClassName("rating__input");
this.options = new Array<string>(inputs.length);
for (var i = 0; i < this.options.length; i++) {
this.options[i] = inputs[i].getAttribute("data-op");
}*/
}
}
inquiry
()
{
inquiry
()
{
...
@@ -94,8 +72,7 @@ export class InquiryPage {
...
@@ -94,8 +72,7 @@ export class InquiryPage {
this
.
restProvider
.
save_inquiry
(
this
.
userID
,
this
.
response
,
this
.
conversationID
).
then
(
data
=>
{
this
.
restProvider
.
save_inquiry
(
this
.
userID
,
this
.
response
,
this
.
conversationID
).
then
(
data
=>
{
console
.
log
(
'
resp:
'
+
data
);
console
.
log
(
'
resp:
'
+
data
);
let
alert
=
this
.
alertCtrl
.
create
({
let
alert
=
this
.
alertCtrl
.
create
({
title
:
'
Mensaje
'
,
subTitle
:
'
Gracias por brindarnos su valiosa opinion!
'
,
message
:
'
Gracias por brindarnos su valiosa opinion!
'
,
buttons
:
[
'
Aceptar
'
]
buttons
:
[
'
Aceptar
'
]
});
});
alert
.
present
();
alert
.
present
();
...
...
src/pages/menu/menu.ts
View file @
0b79e396
...
@@ -100,21 +100,25 @@ export class MenuPage {
...
@@ -100,21 +100,25 @@ export class MenuPage {
this
.
storage
.
set
(
'
name
'
,
data
[
'
nombre
'
]);
this
.
storage
.
set
(
'
name
'
,
data
[
'
nombre
'
]);
this
.
storage
.
set
(
'
reciverJID
'
,
this
.
jid
);
this
.
storage
.
set
(
'
reciverJID
'
,
this
.
jid
);
this
.
storage
.
set
(
'
conversationID
'
,
data
[
'
idConversacion
'
]);
this
.
storage
.
set
(
'
conversationID
'
,
data
[
'
idConversacion
'
]);
//
this.storage.set('aplicarEncuesta', data['aplicarEncuesta']);
this
.
storage
.
set
(
'
aplicarEncuesta
'
,
data
[
'
aplicarEncuesta
'
]);
this
.
storage
.
set
(
'
aplicarEncuesta
'
,
1
);
//
this.storage.set('aplicarEncuesta', 1);
this
.
loader
.
show
(
'
Please Wait
'
);
this
.
loader
.
show
(
'
Please Wait
'
);
this
.
xmppService
.
login
(
this
.
senderJID
,
this
.
password
);
this
.
xmppService
.
login
(
this
.
senderJID
,
this
.
password
);
}
}
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
if
(
error
&&
error
.
error
&&
error
.
error
.
error
)
{
/*
if (error && error.error && error.error.error) {
let alert = this.alertCtrl.create({
let alert = this.alertCtrl.create({
subTitle: error.error.error,
subTitle: error.error.error,
buttons: ['Dismiss']
buttons: ['Dismiss']
});
});
alert.present();
alert.present();
}
}*/
this
.
loader
.
show
(
'
Please Wait
'
);
this
.
loader
.
hide
();
this
.
navCtrl
.
push
(
"
FormularyPage
"
);
});
});
}
}
...
...
src/providers/rest/rest.ts
View file @
0b79e396
...
@@ -377,4 +377,22 @@ export class RestProvider {
...
@@ -377,4 +377,22 @@ export class RestProvider {
});
});
});
});
}
}
save_form
(
rut
,
request
,
message
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
http
.
post
(
'
https://
'
+
SERVERS
.
get
()
+
'
/api/registrar/solicitud/formulario
'
,
{
"
rut
"
:
rut
,
"
respuesta
"
:
{
"
requerimiento
"
:
request
,
"
mensaje
"
:
message
}
}
,
httpOptions
).
subscribe
(
res
=>
{
console
.
log
(
'
res:
'
+
res
);
resolve
(
res
);
},
(
err
)
=>
{
console
.
log
(
'
err:
'
+
err
);
reject
(
err
);
});
});
}
}
}
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