Commit c56c9ee9 authored by Trino Parra's avatar Trino Parra

QA modifications

parent 7756b8f5
......@@ -22,6 +22,7 @@
<preference name="SplashScreenDelay" value="3000" />
<preference name="AndroidPersistentFileLocation" value="Compatibility" />
<preference name="AndroidExtraFilesystems" value="files,files-external,documents,sdcard,root" />
<preference name="Orientation" value="portrait" />
<platform name="android">
<allow-intent href="market:*" />
<icon qualifier="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
......@@ -33,15 +34,9 @@
<splash qualifier="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
<splash qualifier="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
<splash qualifier="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
<splash qualifier="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
<splash qualifier="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
<splash qualifier="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
<splash qualifier="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
<splash qualifier="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
<splash qualifier="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
<splash qualifier="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
<splash qualifier="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
<splash qualifier="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
</platform>
<platform name="ios">
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
......
......@@ -54,7 +54,7 @@ export class MyApp {
this.pages = [
{ icon: 'ios-arrow-forward', title: 'Solicita tu viaje', component: 'ChatPage'},
{ icon: 'ios-arrow-forward', title: 'Consejos para tu viaje', component: 'TraveladvicePage'},
{ icon: 'ios-arrow-forward', title: 'Datos Utiles', component: 'UsefulinfoPage'},
{ icon: 'ios-arrow-forward', title: 'Datos útiles', component: 'UsefulinfoPage'},
{ icon: 'ios-arrow-forward', title: 'Notificaciones', component: 'NotiListPage'},
];
......
......@@ -45,7 +45,9 @@
<ion-row>
<ion-col col-1 col-xl-1 style="text-align: center!important">
<ion-icon name="ios-arrow-back" class="backicon" (click)="goback()"></ion-icon>
<button ion-button (click)="goback()" class="backbtn">
<ion-icon name="ios-arrow-back" class="backicon" ></ion-icon>
</button>
</ion-col>
<ion-col col-9 col-xl-9>
......@@ -105,7 +107,7 @@
<ion-textarea type="text" #chat_input
[(ngModel)]="editorMsg"
(keyup.enter)="sendMsg()"
(focusin)="onFocus()" pellcheck="true" autoComplete="true" autocorrect="true" placeholder="Enviar mansaje..." [(ngModel)]="message" class="textmsg"></ion-textarea>
(focusin)="onFocus()" pellcheck="true" autoComplete="true" autocorrect="true" placeholder="Escribir mensaje..." [(ngModel)]="message" class="textmsg"></ion-textarea>
</ion-col>
<ion-col col-1 col-xl-1 style="margin-top: 6px;">
......
page-chat {
.backbtn {
margin:0px;
left:0px;
top:0px;
background:none;
position: absolute;
box-shadow: none;
}
.backbtn:active {
background: #B3061E;;
}
.message-wrap .message .user-img {
position: absolute;
border-radius: 45px;
......
......@@ -7,13 +7,13 @@
<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>
<h6 class="header6">En estos momentos nuestros ejecutivos se encuentran ocupados, por favor indíquenos su requerimiento y nuestro equipo se contactará 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-select formControlName="request" *ngIf="isSchema()" placeholder="Seleccione una opción" okText="Aceptar" cancelText="Cancelar">
<ion-option *ngFor="let req of shema.formulario[0].opciones" [value]="req">{{req}}</ion-option>
</ion-select>
</ion-item>
......
......@@ -12,7 +12,6 @@ page-formulary {
.headerimg{
margin-top: 10px;
}
.header6{
text-align: center;
color: #787879;
......
......@@ -38,6 +38,10 @@ export class FormularyPage {
this.restProvider.getCofiguration().then(msg => {
console.log(msg['formularioJson']);
this.shema = msg['formularioJson']['formularioJson'];
if (this.isSchema()){
this.shema.formulario[0].nombre = this.capitalize(this.shema.formulario[0].nombre);
this.shema.formulario[1].nombre = this.capitalize(this.shema.formulario[1].nombre);
}
});
}
isSchema(){
......@@ -65,13 +69,12 @@ export class FormularyPage {
});
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!',
subTitle: '¡Su solicitud fue recibida, en breve lo atenderemos!',
buttons: ['Aceptar']
});
alert.present();
......@@ -83,7 +86,9 @@ export class FormularyPage {
});
}
}
capitalize(str){
return str.charAt(0).toUpperCase() + str.slice(1);
}
goback() {
this.navCtrl.pop();
}
......
......@@ -26,7 +26,7 @@
</ion-col>
</ion-row>
<ion-row class="borderdrop" radio-group [(ngModel)]="siNo" name="res2" *ngIf="shema">
<ion-col col-2 col-xl-2></ion-col>
<ion-col col-1 col-xl-1></ion-col>
<ion-col col-4 col-xl-4 style="margin:15px">
<ion-label style="display: inline" *ngIf="shema[1].opcionesPregunta[0].textoOpcion">{{shema[1].opcionesPregunta[0].textoOpcion}}</ion-label>
<ion-radio style="vertical-align:middle" value="0"></ion-radio>
......@@ -35,7 +35,6 @@
<ion-label style="display: inline" *ngIf="shema[1].opcionesPregunta[1].textoOpcion">{{shema[1].opcionesPregunta[1].textoOpcion}}</ion-label>
<ion-radio style="vertical-align:middle" value="1" ></ion-radio>
</ion-col>
<ion-col col-2 col-xl-2></ion-col>
</ion-row>
</ion-grid>
<br />
......
......@@ -5,13 +5,6 @@ import { RestProvider, UserInfo } from '../../providers/rest/rest';
import { AlertController } from 'ionic-angular';
import { Storage } from '@ionic/storage';
/**
* Generated class for the InquiryPage page.
*
* See https://ionicframework.com/docs/components/#navigation for more info on
* Ionic pages and navigation.
*/
@IonicPage()
@Component({
selector: 'page-inquiry',
......@@ -50,15 +43,13 @@ export class InquiryPage {
this.response[0].res = this.shema[0].opcionesPregunta[this.shema[0].opcionesPregunta.length - 1].valorOpcion;
this.response[0].option = this.shema[0].opcionesPregunta[this.shema[0].opcionesPregunta.length - 1].idOpcion;
console.log('construct InquiryPage 1');
this.storage.get('companyLogo').then((getcompanyLogo) => {
this.getcompanyLogo = getcompanyLogo;
});
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"; }
console.log('construct InquiryPage 2');
}
inquiry() {
......@@ -80,7 +71,7 @@ export class InquiryPage {
this.restProvider.save_inquiry(this.userID, this.response,this.conversationID).then(data => {
console.log('resp: ' + data);
let alert = this.alertCtrl.create({
subTitle: 'Gracias por brindarnos su valiosa opinion!',
subTitle: '¡Gracias por brindarnos tu valiosa opinión!',
buttons: ['Aceptar']
});
alert.present();
......
......@@ -31,7 +31,7 @@
<ion-col col-6 col-xl-6 col-lg-6 col-md-6 (click)="usefulinfo()" class="colinfo">
<img src="assets/imgs/Marqueta/img_3.png" class="infoImg">
<p class="para">Datos utiles</p>
<p class="para">Datos útiles</p>
</ion-col>
</ion-row>
......@@ -104,7 +104,7 @@
<ion-col col-6 col-xl-6 col-lg-6 col-md-6 (click)="usefulinfo()" class="colinfo" style="background-color: #817F86;">
<img src="assets/imgs/Marqueta/qqq.jpg" class="infoImg1">
<p class="para">Datos utiles</p>
<p class="para">Datos útiles</p>
</ion-col>
</ion-row>
......
......@@ -102,29 +102,24 @@ export class MenuPage {
this.storage.set('conversationID', data['idConversacion']);
//this.storage.set('aplicarEncuesta', 1);
this.storage.set('aplicarEncuesta', data['aplicarEncuesta']);
this.loader.show('Please Wait');
this.loader.show('Espera por favor');
this.xmppService.login(this.senderJID, this.password);
}
}).catch(error => {
/*if (error && error.error && error.error.error) {
let alert = this.alertCtrl.create({
subTitle: error.error.error,
buttons: ['Dismiss']
});
alert.present();
}*/
this.loader.show('Please Wait');
this.loader.show('Espera por favor');
this.loader.hide();
this.navCtrl.push("FormularyPage");
});
/*this.loader.show('Espera por favor');
this.loader.hide();
this.navCtrl.push("FormularyPage");*/
}
traveladvice() {
this.loader.show('Please Wait');
this.loader.show('Espera por favor');
this.loader.hide();
this.navCtrl.push("TraveladvicePage");
......@@ -132,7 +127,7 @@ export class MenuPage {
usefulinfo() {
this.loader.show('Please Wait');
this.loader.show('Espera por favor');
this.loader.hide();
this.navCtrl.push("UsefulinfoPage");
......@@ -140,7 +135,7 @@ export class MenuPage {
phone() {
this.loader.show('Please Wait');
this.loader.show('Espera por favor');
if (this.restProvider.getNetworkType() == 'none') {
......
......@@ -8,7 +8,7 @@
<ion-navbar>
<ion-title>teléfonos de emergencia</ion-title>
<ion-title>Teléfonos de emergencia</ion-title>
<ion-buttons end >
......
......@@ -36,7 +36,7 @@
<br/>
<div class="error-message">
<div class="error-message" *ngIf="error">
{{error}}
</div>
......
......@@ -38,6 +38,11 @@ page-passportlogin {
text-align: center;
color: red;
}
.parag2{
font-weight: bold;
text-align: center;
color: green;
}
.item-input .label-ios, .item-select .label-ios, .item-datetime .label-ios {
color: #424242;
}
......
......@@ -14,14 +14,14 @@ import { Loader } from "../../providers/loader/loader";
})
export class PassportloginPage {
headerdisplay : any;
public passportloginForm:FormGroup;
error : any = '';
rut : any;
headerdisplay: any;
public passportloginForm: FormGroup;
error: any = '';
rut: any;
VIP: boolean = false;
cargo: any;
empresaID : any;
token : any;
empresaID: any;
token: any;
constructor(public navCtrl: NavController, public navParams: NavParams,
public plt: Platform, private loader: Loader,
......@@ -45,25 +45,27 @@ export class PassportloginPage {
console.log('ionViewDidLoad PassportloginPage');
}
onChange(){
if (this.rut){
if (this.rut.length>1){
if (this.rut.split("-")[1] || this.rut.split("-")[1] == ""){
this.rut = this.rut.split("-")[0]+this.rut.split("-")[1];
onChange() {
if (this.rut) {
if (this.rut.length > 1) {
if (this.rut.split("-")[1] || this.rut.split("-")[1] == "") {
this.rut = this.rut.split("-")[0] + this.rut.split("-")[1];
}
this.rut = this.rut.slice(0, this.rut.length-1)+"-"+this.rut.slice(this.rut.length-1, this.rut.length);
this.rut = this.rut.slice(0, this.rut.length - 1) + "-" + this.rut.slice(this.rut.length - 1, this.rut.length);
}
}
if (this.error){
this.error = null;
}
}
passportlogin(){
console.log("Login in...");
this.error = '';
this.loader.show('Please Wait');
let rutData : any = this.passportloginForm.value.usuario;
if(this.passportloginForm.value.usuario == '' || this.passportloginForm.value.usuario.length == 0){
passportlogin() {
this.error = null;
this.loader.show('Espera por favor');
let rutData: any = this.passportloginForm.value.usuario;
if (this.passportloginForm.value.usuario == '' || this.passportloginForm.value.usuario.length == 0) {
this.loader.hide();
} else{
} else {
window.localStorage.setItem('usuario', this.passportloginForm.value.usuario);
this.restProvider.getRut(rutData)
.then(data => {
......@@ -74,23 +76,23 @@ export class PassportloginPage {
this.empresaID = data['idempresa'];
this.storage.set('empresaId', this.empresaID);
this.storage.set('rut', data['RUT']);
if(data['error']){
if (data['error']) {
this.loader.hide();
this.error = data['error'];
console.log("error1: " + this.error);
} else {
this.loader.hide();
this.storage.set('isPassportLogin', true);
this.navCtrl.push("PasswordPage", {rut: data['RUT']});
this.navCtrl.push("PasswordPage", { rut: data['RUT'] });
}
}).catch(error => {
this.loader.hide();
if(error.error['error'] == "RUT no existe") {
this.error = "Rut Invalido";
if (error.error['error'] == "RUT no existe") {
this.error = "Lo sentimos, el RUT proporcionado no se encuentra en nuestros registros ";
} else if (error.error['error'] == "Formato de RUT/Email no Valido") {
this.error = "El RUT ingresado no es válido";
} else {
this.error = error.error['error'];
}
console.log("error2: " + this.error);
});
}
}
......
......@@ -39,7 +39,7 @@
{{error}}
</div>
<p class="forgotpwd" (click)="resetpassword()" style="cursor: pointer;">Perdiste tu clave?</p>
<p class="forgotpwd" (click)="resetpassword()" style="cursor: pointer;">Recupera tu clave</p>
<br/>
......
......@@ -68,10 +68,11 @@ export class PasswordPage {
passwordlogin(){
this.error = '';
this.loader.show('Please Wait');
this.loader.show('Espera por favor');
let clave : any = this.passwordloginForm.value.password;
if(this.passwordloginForm.value.password == ''){
this.error = "please enter your Password";
this.loader.hide();
this.error = "Ingresa tu clave secreta";
} else{
window.localStorage.setItem('password', this.passwordloginForm.value.password);
this.restProvider.getClaveData(this.rut, clave)
......
......@@ -21,14 +21,15 @@
<br/>
<br/>
<ion-item class="itemclr">
<ion-label stacked>Please Enter Your Rut</ion-label>
<ion-input type="text" formControlName="rut" [class.invalid]="!resetForm.controls.rut.valid && resetForm.controls.rut.dirty" (keypress)="onChange($event)"></ion-input>
<ion-label stacked>Ingresa tu Rut (ej. 9456789-K, 18934567-4)</ion-label>
<ion-input type="text" formControlName="rut" [(ngModel)]="rut"
[class.invalid]="!resetForm.controls.rut.valid && resetForm.controls.rut.dirty" (ionChange)="onChange($event)"></ion-input>
</ion-item>
<div *ngIf="!resetForm.controls.rut.valid && resetForm.controls.rut.dirty">
<p class="parag">Please enter a valid rut.</p>
<p class="parag">Por favor ingrese un Rut válido.</p>
</div>
<br/>
<div class="error-message">
<div class="error-message" *ngIf="error">
{{error}}
</div>
<br/>
......
......@@ -32,6 +32,11 @@ page-resetpassword {
.ion-input:hover{
background-color: #CB0D12;
}
.parag2{
font-weight: bold;
text-align: center;
color: green;
}
.parag{
text-align: center;
color: red;
......
......@@ -19,13 +19,13 @@ import { Storage } from '@ionic/storage';
})
export class ResetpasswordPage {
headerdisplay : any;
public resetForm:FormGroup;
error : any;
rut : any;
appid : any;
email : any;
idempresa : any;
headerdisplay: any;
public resetForm: FormGroup;
error: any;
rut: any;
appid: any;
email: any;
idempresa: any;
constructor(public navCtrl: NavController, public navParams: NavParams,
public plt: Platform, private formBuilder: FormBuilder,
......@@ -33,7 +33,7 @@ export class ResetpasswordPage {
public restProvider: RestProvider, private storage: Storage) {
this.storage.get("isPassportLogin").then((resulst) => {
if(resulst){
if (resulst) {
this.storage.get("rut").then((getRut) => {
this.rut = getRut;
});
......@@ -61,43 +61,54 @@ export class ResetpasswordPage {
console.log('ionViewDidLoad ResetpasswordPage');
}
onChange(){
if(this.resetForm.value.rut.length > -1){
this.error = '';
onChange() {
if (this.rut) {
if (this.rut.length > 1) {
if (this.rut.split("-")[1] || this.rut.split("-")[1] == "") {
this.rut = this.rut.split("-")[0] + this.rut.split("-")[1];
}
this.rut = this.rut.slice(0, this.rut.length - 1) + "-" + this.rut.slice(this.rut.length - 1, this.rut.length);
}
}
if (this.error){
this.error = null;
}
}
reset(){
this.error = ''
this.loader.show('Please Wait');
reset() {
this.error = null
this.loader.show('Espera por favor');
let rut = this.resetForm.value.rut;
if (this.resetForm.value.rut == '' || this.resetForm.value.rut.length == 0) {
this.loader.hide();
} else {
this.restProvider.getRecoverClave(rut, this.appid, this.idempresa)
.then(data => {
this.email = data['email'];
if(this.email){
if (this.email) {
this.loader.hide();
let toastSuccess = this.toastCtrl.create({
message: 'Password sent, please check your mail!',
message: '¡Clave enviada, por favor verfica tu email!',
duration: 6000,
position: 'top',
showCloseButton:true,
closeButtonText:'X',
showCloseButton: true,
closeButtonText: 'X',
cssClass: "toast-success",
});
toastSuccess.present();
this.navCtrl.push("PassportloginPage");
}
if(data['error']){
if (data['error']) {
this.error = data['error'];
} else {
this.error = '';
this.error = null;
}
}).catch(error => {
this.loader.hide();
this.error = error.error['error'];
});
}
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment