changes to admin files and adittion to some features to admin profile
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
ionic cordova build --release android
|
||||
#Just excecute on first time it's the keystore generation
|
||||
#keytool -genkey -v -keystore SintomApp.keystore -alias sintomApp -keyalg RSA -keysize 2048 -validity 10000
|
||||
#Password APPp455w0rd
|
||||
#Signing APP
|
||||
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore SintomApp.keystore ./platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk sintomApp
|
||||
#APK signed and ready to upload
|
||||
zipalign -v 4 ./platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk sintomApp.apk
|
||||
#pepk.jar it to upload keystore to Google console
|
||||
java -jar pepk.jar --keystore=SintomApp.keystore --alias=sintomApp --output=keySintomApp.zip --include-cert --encryptionkey=eb10fe8f7c7c9df715022017b00c6471f8ba8170b13049a11e6c09ffe3056a104a3bbe4ac5a955f4ba4fe93fc8cef27558a3eb9d2a529a2092761fb833b656cd48b9de6a
|
||||
@@ -1,9 +1,37 @@
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-title>adminPage</ion-title>
|
||||
<ion-title>Administrador</ion-title>
|
||||
<ion-buttons slot="start">
|
||||
<ion-back-button defaultHref="loggin"></ion-back-button>
|
||||
</ion-buttons>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
<ion-content [fullscreen]="true" class="grad">
|
||||
<ion-item color="translucent">
|
||||
<ion-icon name="school-outline" color="secondary"></ion-icon>
|
||||
<ion-label>Carreras</ion-label>
|
||||
</ion-item>
|
||||
<ion-item color="translucent">
|
||||
<div class="ion-padding">
|
||||
<ion-list class="list-bg">
|
||||
<ion-item color="none" *ngFor="let entry of carrers" >
|
||||
<ion-label>{{entry.name}}</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
</ion-item>
|
||||
|
||||
<ion-item color="translucent">
|
||||
<ion-icon name="nutrition-outline" color="secondary"></ion-icon>
|
||||
<ion-label>Secretarios</ion-label>
|
||||
|
||||
</ion-item>
|
||||
|
||||
<ion-fab vertical="bottom" horizontal="end" slot="fixed">
|
||||
<ion-fab-button>
|
||||
<ion-icon name="add-circle-outline" ></ion-icon>
|
||||
</ion-fab-button>
|
||||
</ion-fab>
|
||||
|
||||
</ion-content>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { AuthService } from '../services/auth.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-admin-page',
|
||||
@@ -6,10 +7,19 @@ import { Component, OnInit } from '@angular/core';
|
||||
styleUrls: ['./admin-page.page.scss'],
|
||||
})
|
||||
export class AdminPagePage implements OnInit {
|
||||
|
||||
carrers = [];
|
||||
|
||||
constructor() { }
|
||||
constructor(private auth:AuthService) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.auth.store.get("user/get-careers").subscribe(
|
||||
res => {
|
||||
this.carrers = res;
|
||||
this.carrers.forEach(element => {
|
||||
console.log(element)});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ const routes: Routes = [
|
||||
loadChildren: () => import('./admintabs/admintabs.module').then( m => m.AdmintabsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'admin-page',
|
||||
path: 'admin',
|
||||
loadChildren: () => import('./admin-page/admin-page.module').then( m => m.AdminPagePageModule)
|
||||
},
|
||||
];
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<ion-icon slot="start" name="person" color="secondary"></ion-icon>
|
||||
<ion-input inputmode="numeric" placeholder="Número de cuenta"
|
||||
[(ngModel)]="data.cuenta"
|
||||
name="cuenta" minlength=6
|
||||
name="cuenta" minlength=6 maxlength=8
|
||||
required>
|
||||
</ion-input>
|
||||
</ion-item>
|
||||
|
||||
@@ -94,10 +94,12 @@ export class LogginPage implements OnInit {
|
||||
|
||||
routeDirector(userRole){
|
||||
console.log(userRole.details.authorities)
|
||||
if(userRole.details.authorities[0]=== "ROLE_USER"){
|
||||
if(userRole.details.authorities[0]==="ROLE_USER"){
|
||||
this.nav.navigateForward('/tabs/user');
|
||||
} else if (userRole.details.authorities[0]=== "ROLE_SECRETARY"){
|
||||
} else if (userRole.details.authorities[0]==="ROLE_SECRETARY"){
|
||||
this.nav.navigateForward('/admintabs');
|
||||
} else if (userRole.details.authorities[0]==="ROLE_ADMIN"){
|
||||
this.nav.navigateForward('/admin');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,7 +116,13 @@ export class LogginPage implements OnInit {
|
||||
value : JSON.stringify(data)
|
||||
},
|
||||
});
|
||||
}
|
||||
} else if (data.details.authorities[0]=== "ROLE_ADMIN"){
|
||||
this.router.navigate(['/admin'],{
|
||||
queryParams: {
|
||||
value : JSON.stringify(data)
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
async presentAlertCredenciales() {
|
||||
|
||||
@@ -41,7 +41,7 @@ export class Tab2Page implements OnInit{
|
||||
async presentToast() {
|
||||
const toast = await this.toast.create({
|
||||
message: 'Sintomas enviados, gracias',
|
||||
duration: 20000
|
||||
duration: 30000
|
||||
});
|
||||
toast.present();
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
export const environment = {
|
||||
production: false,
|
||||
server: 'http://192.168.0.7:9707/'
|
||||
server: 'http://192.168.0.9:9707/'
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user