Commit e8ad702c by Matteo

Modifiche per apk a Mannelli, messo id fisso verso 2p2

parent 03067241
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.starter" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="it.aimconsulting.intranet.app" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Intranet</name>
<description>An awesome Ionic/Cordova app.</description>
<author email="hi@ionicframework.com" href="http://ionicframework.com/">Ionic Framework Team</author>
......
<ion-header class="header-subpage" no-border>
<ion-toolbar>
<ion-title class="titolo-sezione-head">{{ 'titolo_documenti' | translate }}</ion-title>
</ion-toolbar>
<ion-header class="header" no-border>
<ion-grid class="header-subpage">
<ion-row justify-content-center>
<ion-col align-self-center size-lg="7">
<ion-toolbar>
<ion-buttons (click)="condividiDocumenti()" slot="start" title="{{'uscita' | translate}}" style="visibility: hidden;">
<ion-icon name="share" color="light" class="exit" tappable></ion-icon>
</ion-buttons>
<ion-title class="titolo-sezione-head">{{ 'titolo_documenti' | translate }}</ion-title>
<ion-buttons (click)="condividiDocumenti()" slot="end" title="{{'uscita' | translate}}" id="buttonsDoc" style="visibility: hidden;">
<ion-icon name="share" color="light" class="exit" tappable></ion-icon>
</ion-buttons>
</ion-toolbar>
</ion-col>
</ion-row>
</ion-grid>
</ion-header>
<ion-content>
......@@ -29,10 +41,10 @@
<span class="riga"><strong>{{ 'cerca' | translate }}</strong> {{ 'titolo' | translate }} <input type="text" name="calendar" [(ngModel)]="titolo" title="{{ 'ricerca_titolo' | translate }}" class="cerca-titolo-doc">
<ion-button (click)="cercaDocumenti()" class="search-arrow" title="{{ 'cerca_documenti' | translate }}"><ion-icon class="button-icon" slot="icon-only" name="arrow-round-forward" title="{{ 'cerca_documenti' | translate }}"></ion-icon></ion-button></span>
</ion-row>
<ion-row class="search-date" id="buttonsDoc" style="display:none">
<!--<ion-row class="search-date" id="buttonsDoc" style="display:none">
<div><span class="condividi-text">{{ 'condividi' | translate }}</span>
<ion-button (click)="condividiDocumenti()" class="search-arrow" title="{{ 'condividi_doc' | translate }}"><ion-icon class="button-icon" slot="icon-only" name="share" title="{{ 'condividi_doc' | translate }}"></ion-icon></ion-button></div>
</ion-row>
</ion-row>-->
<ion-row class="search-date-border">
</ion-row>
<!--<ion-row class="search-date" *ngIf="!platform.is('desktop')">
......@@ -81,25 +93,43 @@
</ion-col>
<ion-col></ion-col>
</ion-row>-->
<ion-list *ngFor="let documento of documenti.documenti; trackBy: trackByDoc" class="row-results">
<ion-checkbox name="privacy" *ngIf="!platform.is('desktop')" [(ngModel)]="documento.checked" class="check" (click)="checkSelected(documento.idDocumento)"> </ion-checkbox>
<div class="table-row">
<div class="row-text">
<strong>{{documento.titolo}}</strong>
<div class="detail">
{{documento.data}}
<span *ngIf="platform.is('desktop')">
<ion-list *ngFor="let documento of documenti.documenti; trackBy: trackByDoc" class="row-results">
<div class="table-row">
<div class="row-text">
<strong>{{documento.titolo}}</strong>
<div class="detail">
{{documento.data}}
</div>
</div>
<div class="row-download item-no-border">
<a href="{{documento.url}}" target="_blank" download tappable title="{{ 'scarica_doc' | translate }}">
<ion-icon name="cloud-download" title="{{ 'scarica_doc' | translate }}"></ion-icon>
</a>
</div>
</div>
<div class="row-download item-no-border">
<a *ngIf="platform.is('desktop')" href="{{documento.url}}" target="_blank" download tappable title="{{ 'scarica_doc' | translate }}">
<ion-icon name="cloud-download" title="{{ 'scarica_doc' | translate }}"></ion-icon>
</a>
<!--<a *ngIf="platform.is('desktop')" href="{{documento.url}}" target="_blank" download>Clicca per scaricare il documento</a>-->
<ion-icon name="share-alt" *ngIf="!platform.is('desktop')" (click)="getDocumento(documento.idDocumento, documento.nomeFile);" target="_blank" download tappable title="{{ 'condividi_documento' | translate }}"></ion-icon>
<div class="clr"></div>
</ion-list>
</span>
<span *ngIf="!platform.is('desktop')">
<ion-list *ngFor="let documento of documenti.documenti; trackBy: trackByDoc" tappable text-wrap (click)="selection?toggleGroup(documento.idDocumento):selectItem(documento.idDocumento)"
(press)="selectItem(documento.idDocumento)" [ngStyle]="{'background-color': documento.checked ? '#c3ddec' : '#ffffff'}" class="row-results">
<ion-checkbox name="privacy" [(ngModel)]="documento.checked" class="check" (click)="checkSelected(documento.idDocumento)"> </ion-checkbox>
<div class="table-row">
<div class="row-text">
<strong>{{documento.titolo}}</strong>
<div class="detail">
{{documento.data}}
</div>
</div>
<div class="row-download item-no-border">
<ion-icon name="eye" (click)="getDocumento(documento.idDocumento, documento.nomeFile);" target="_blank" download tappable title="{{ 'vedi_documento' | translate }}"></ion-icon>
</div>
</div>
</div>
<div class="clr"></div>
</ion-list>
<div class="clr"></div>
</ion-list>
</span>
</ion-grid>
</div>
</div>
......
......@@ -78,14 +78,67 @@ export class DocumentiPage implements OnInit {
getDocumento(idDoc, nomeFile: string)
{
var fileUrl = this.httpClientDataService.BASE_ADDRESS+"/intranet/documento.do?idcliente="+this.idCliente+"&iddocumento="+idDoc;
//this.utilService.downloadDocumento(fileUrl, nomeFile);
this.utilService.shareDocumento(fileUrl, nomeFile);
this.utilService.downloadDocumento(fileUrl, nomeFile);
//this.utilService.shareDocumento(fileUrl, nomeFile);
}
documentoId;
idSelected: number;
selection: boolean = false;
clickCheckbox: boolean = false;
toggleGroup(id : number)
{
if(this.clickCheckbox)
{
this.clickCheckbox = false;
return;
}
this.selection = true;
this.idSelected = id;
this.hideButtons()
this.documenti.documenti.forEach(this.toggle, this);
}
toggle(documento: Documento, index)
{
if(documento.idDocumento == this.idSelected)
{
if(documento.checked) documento.checked = false;
else{
documento.checked = true;
this.showButtons();
}
}
else if(documento.checked) this.showButtons();
}
selectItem(id: number) {
// alert ("INsiede item selection");
if(this.clickCheckbox)
{
this.clickCheckbox = false;
return;
}
this.selection = true;
this.idSelected = id;
this.hideButtons()
this.documenti.documenti.forEach(this.select, this);
}
select(documento: Documento, index)
{
if(documento.idDocumento == this.idSelected)
{
documento.checked = true;
this.showButtons();
}
}
checkSelected(id)
{
this.clickCheckbox = true;
this.documentoId = id;
this.hideButtons()
this.documenti.documenti.forEach(this.check, this);
......@@ -97,16 +150,18 @@ export class DocumentiPage implements OnInit {
if(!documento.checked && documento.idDocumento == this.documentoId) this.showButtons();
}
showButtons()
{
var buttons = document.getElementById('buttonsDoc');
buttons.setAttribute("style", "display:block");
buttons.setAttribute("style", "visibility: visible");
}
hideButtons()
{
var buttons = document.getElementById('buttonsDoc');
buttons.setAttribute("style", "display:none");
buttons.setAttribute("style", "visibility: hidden");
}
docSel: Array<Pair>;
......
import { Cliente } from './../../auth/interface/cliente';
import { Component } from '@angular/core';
import { Router } from "@angular/router";
import { Events, MenuController } from '@ionic/angular';
import { Events, MenuController, Platform } from '@ionic/angular';
import { AuthService } from '../../auth/service/auth.service';
import { UtilService } from '../../service/util.service';
import { Pair } from 'src/app/interface/pair';
import { TranslateService } from '@ngx-translate/core';
@Component({
selector: 'app-home',
templateUrl: 'home.page.html',
styleUrls: ['home.page.scss']
})
export class HomePage {
constructor(private authService: AuthService, private router: Router, public events: Events, public menuCtrl: MenuController, private utilService: UtilService, public translate: TranslateService) {
constructor(
private authService: AuthService,
private router: Router,
public events: Events,
public menuCtrl: MenuController,
private utilService: UtilService,
public translate: TranslateService,
public platform: Platform
) {
this.clienti = [];
this.clienteSelezionato = {
denominazione: null,
......@@ -40,6 +47,12 @@ export class HomePage {
this.events.subscribe('functionCall:linguaCambiata', eventData => {
translate = utilService.translate;
});
this.events.subscribe('functionCall:parere', eventData => {
this.router.navigateByUrl('home/parere');
});
this.events.subscribe('functionCall:interviste', eventData => {
this.router.navigateByUrl('home/interviste');
});
this.lingue = utilService.getLanguageList();
if(utilService.getLingua() == "") {
this.linguaSel = this.lingue[0].key;
......@@ -49,8 +62,56 @@ export class HomePage {
}
else this.linguaSel = utilService.getLingua();
translate = utilService.translate;
this.platform.backButton.subscribeWithPriority(0, () => {
let defaultUrl: string []=[
"/home",
"/login",
"/reset",
"/businesscall",
"/privacy",
"/home/index",
"/home/documenti",
"/home/change-pwd",
"/home/segreteria"
];
if(defaultUrl.indexOf(this.router.url) != -1)
{
switch(this.router.url)
{
case "/login":
{
navigator['app'].exitApp();
break;
}
case "/home":
case "/home/index":
case "/reset":
case "/businesscall":
{
this.router.navigateByUrl('login');
break;
}
case "/privacy":
{
this.router.navigateByUrl('businesscall');
break;
}
case "/home/documenti":
case "/home/change-pwd":
case "/home/segreteria":
{
this.router.navigateByUrl('home/index');
break;
}
}
}
else this.events.publish('functionCall:manageBackButton', null);
});
}
clienti: Cliente[];
clienteSel;
clienteSelezionato: Cliente;
......@@ -83,8 +144,9 @@ export class HomePage {
}
logout(){
this.authService.logout();
this.router.navigateByUrl('login');
//this.authService.logout();
//this.router.navigateByUrl('login');
this.utilService.logout();
}
ngOnInit() {
......
......@@ -67,27 +67,30 @@
</div>
</ion-row>
<span class="row-results">
<ion-list *ngFor="let topic of topics; trackBy: trackByDoc" class="row-results">
<ion-checkbox name="privacy" [(ngModel)]="topic.checked" class="check" (click)="checkSelected(topic.idRichiesta)"> </ion-checkbox>
<div class="table-row">
<div class="row-text data" text-wrap>
{{topic.data}}
<div text-wrap>{{topic.titolo}}</div>
</div>
<div class="richieste-button group-icon2 row-download-special">
<div><a class="select" (click)="apriTopic(topic.idRichiesta)" tappable title="{{ 'visualizza_dettagli' | translate }}">
<ion-icon name="arrow-round-forward"></ion-icon>
</a></div>
<ion-list *ngFor="let topic of topics; trackBy: trackByDoc" class="row-results" (click)="selection?toggleGroup(topic.idRichiesta):selectItem(topic.idRichiesta)"
(press)="selectItem(topic.idRichiesta)" [ngStyle]="{'background-color': topic.checked ? '#c3ddec' : '#ffffff'}">
<ion-checkbox name="privacy" [(ngModel)]="topic.checked" class="check" (click)="checkSelected(topic.idRichiesta)"> </ion-checkbox>
<div class="table-row">
<div class="row-text data" text-wrap>
{{topic.data}}
<div text-wrap>{{topic.titolo}}</div>
</div>
<div class="richieste-button group-icon2 row-download-special">
<div class="group-icon2"><!--<a class="select" (click)="apriTopic(topic.idRichiesta)" tappable title="{{ 'visualizza_dettagli' | translate }}">-->
<ion-icon name="arrow-round-forward" (click)="apriTopic(topic.idRichiesta)" tappable title="{{ 'visualizza_dettagli' | translate }}"></ion-icon>
<ion-label>{{ 'apri' | translate }}</ion-label>
</div>
<div class="richieste-button group-icon3 row-download-special">
<div><a class="select" (click)="loadTopics('after')" tappable title="{{ 'aggiorna' | translate }}">
<ion-icon name="refresh-circle"></ion-icon>
</a></div>
<!--</a>--></div>
<!--<ion-label>{{ 'apri' | translate }}</ion-label>-->
</div>
<div class="richieste-button group-icon3 row-download-special">
<div class="group-icon3"><!--<a class="select" (click)="loadTopics('after')" tappable title="{{ 'aggiorna' | translate }}">-->
<ion-icon name="refresh-circle" (click)="loadTopics('after')" tappable title="{{ 'aggiorna' | translate }}"></ion-icon>
<ion-label>{{ 'refresh' | translate }}</ion-label>
</div>
</div>
</ion-list>
<!--</a>--></div>
<!--<ion-label>{{ 'refresh' | translate }}</ion-label>-->
</div>
</div>
</ion-list>
<!--<ion-list *ngFor="let topic of topics; trackBy: trackByDoc" class="chat-list table-row">-->
<!--<ion-checkbox name="privacy" [(ngModel)]="topic.checked" class="check" (click)="checkSelected(topic.idRichiesta)"> </ion-checkbox>
<div class="row-chat-list">
......
......@@ -12,6 +12,7 @@ import { Platform, Events } from '@ionic/angular';
import { ParereService } from 'src/app/service/parere.service';
import { ArchiviaRichiestaResponse } from 'src/app/interface/archivia-richiesta-response';
import { TranslateService } from '@ngx-translate/core';
import { Router } from "@angular/router";
@Component({
selector: 'app-interviste',
......@@ -32,7 +33,8 @@ export class IntervistePage implements OnInit {
public platform: Platform,
public events: Events,
public parereService: ParereService,
public translate: TranslateService
public translate: TranslateService,
public router: Router
) {
this.events.publish('functionCall:startup', null);
this.initPage();
......@@ -44,6 +46,21 @@ export class IntervistePage implements OnInit {
translate = utilService.translate;
});
translate = utilService.translate;
this.events.subscribe('functionCall:manageBackButton', eventData => {
if(this.router.url == "/home/interviste")
{
if(this.intervista == "lista") this.router.navigateByUrl('home/index');
else
{
this.apriLista();
this.router.navigateByUrl('home/index');
setTimeout(() => {
this.events.publish('functionCall:interviste', null);
}, 500);
}
}
});
}
topicAttivo: Richiesta;
......@@ -88,6 +105,58 @@ export class IntervistePage implements OnInit {
this.titolo = "";
}
idSelected: number;
selection: boolean = false;
clickCheckbox: boolean = false;
toggleGroup(id : number)
{
if(this.clickCheckbox)
{
this.clickCheckbox = false;
return;
}
this.selection = true;
this.idSelected = id;
this.hideButtons()
this.topics.forEach(this.toggle, this);
}
toggle(topic: Richiesta, index)
{
if(topic.idRichiesta == this.idSelected)
{
if(topic.checked) topic.checked = false;
else{
topic.checked = true;
this.showButtons();
}
}
else if(topic.checked) this.showButtons();
}
selectItem(id: number) {
// alert ("INsiede item selection");
if(this.clickCheckbox)
{
this.clickCheckbox = false;
return;
}
this.selection = true;
this.idSelected = id;
this.hideButtons()
this.topics.forEach(this.select, this);
}
select(topic: Richiesta, index)
{
if(topic.idRichiesta == this.idSelected)
{
topic.checked = true;
this.showButtons();
}
}
intervisteSelezionate: Array<number>;
error: string;
......@@ -139,6 +208,7 @@ export class IntervistePage implements OnInit {
checkSelected(id)
{
this.clickCheckbox = true;
this.richiestaId = id;
this.hideButtons()
this.topics.forEach(this.check, this);
......
......@@ -75,24 +75,28 @@
</div>
</div>
</ion-list>-->
<ion-list *ngFor="let parere of pareri; trackBy: trackByDoc" class="row-results">
<ion-list *ngFor="let parere of pareri; trackBy: trackByDoc" class="row-results" (click)="selection?toggleGroup(parere.idRichiesta):selectItem(parere.idRichiesta)"
(press)="selectItem(parere.idRichiesta)" [ngStyle]="{'background-color': parere.checked ? '#c3ddec' : '#ffffff'}">
<ion-checkbox name="privacy" [(ngModel)]="parere.checked" class="check" (click)="checkSelected(parere.idRichiesta)"> </ion-checkbox>
<div class="table-row">
<div class="table-row">
<div class="row-text data" text-wrap>
{{parere.data}}
<div text-wrap>{{parere.titolo}}</div>
</div>
<div class="richieste-button group-icon2 row-download-special">
<div><a class="select" (click)="apriParere(parere.idRichiesta)" tappable title="{{ 'visualizza_dettagli' | translate }}">
<ion-icon name="arrow-round-forward"></ion-icon>
</a></div>
<ion-label>{{ 'apri' | translate }}</ion-label>
<div class="group-icon2"><!--<a class="select" (click)="apriParere(parere.idRichiesta)" tappable title="{{ 'visualizza_dettagli' | translate }}">-->
<ion-icon name="arrow-round-forward" (click)="apriParere(parere.idRichiesta)" tappable title="{{ 'visualizza_dettagli' | translate }}"></ion-icon>
<ion-label>{{ 'apri' | translate }}</ion-label>
<!--</a>--></div>
<!--<ion-label>{{ 'apri' | translate }}</ion-label>-->
</div>
<div class="richieste-button group-icon3 row-download-special">
<div><a class="select" (click)="loadPareri('initial')" tappable title="{{ 'aggiorna' | translate }}">
<ion-icon name="refresh-circle"></ion-icon>
</a></div>
<ion-label>{{ 'refresh' | translate }}</ion-label>
<div class="group-icon3"><!--<a class="select" (click)="loadPareri('initial')" tappable title="{{ 'aggiorna' | translate }}">-->
<ion-icon name="refresh-circle" (click)="loadPareri('initial')" tappable title="{{ 'aggiorna' | translate }}"></ion-icon>
<ion-label>{{ 'refresh' | translate }}</ion-label>
<!--</a>--></div>
<!--<ion-label>{{ 'refresh' | translate }}</ion-label>-->
</div>
</div>
</ion-list>
......
import { HttpClientDataService } from './../../service/http-client-data.service';
import { ParereResponse } from './../../interface/parere-response';
import { ParereModalComponent } from './../../components/parere-modal/parere-modal.component';
import { Component, OnInit } from '@angular/core';
import { Component, OnInit, ViewChild } from '@angular/core';
import { ModalController } from '@ionic/angular';
import { UtilService } from '../../service/util.service';
import { RichiesteResponse } from 'src/app/interface/richieste-response';
......@@ -14,6 +14,7 @@ import { NewRichiestaResponse } from 'src/app/interface/new-richiesta-response';
import { Platform, Events, MenuController } from '@ionic/angular';
import { DataWithFileUploaded } from './../../interface/data-with-file-uploaded';
import { TranslateService } from '@ngx-translate/core';
import { Router } from "@angular/router";
@Component({
selector: 'app-parere',
......@@ -30,7 +31,8 @@ export class ParerePage implements OnInit {
public platform: Platform,
public events: Events,
public httpClientDataService: HttpClientDataService,
public translate: TranslateService
public translate: TranslateService,
public router: Router
) {
this.events.publish('functionCall:startup', null);
this.initPage();
......@@ -41,9 +43,24 @@ export class ParerePage implements OnInit {
this.events.subscribe('functionCall:linguaCambiata', eventData => {
translate = utilService.translate;
});
this.events.subscribe('functionCall:manageBackButton', eventData => {
if(this.router.url == "/home/parere")
{
if(this.parere == "lista") this.router.navigateByUrl('home/index');
else
{
this.apriLista();
this.router.navigateByUrl('home/index');
setTimeout(() => {
this.events.publish('functionCall:parere', null);
}, 500);
}
}
});
translate = utilService.translate;
}
initPage()
{
var interventi = new Array();
......@@ -78,6 +95,58 @@ export class ParerePage implements OnInit {
archiviati: boolean;
titolo: string;
idSelected: number;
selection: boolean = false;
clickCheckbox: boolean = false;
toggleGroup(id : number)
{
if(this.clickCheckbox)
{
this.clickCheckbox = false;
return;
}
this.selection = true;
this.idSelected = id;
this.hideButtons()
this.pareri.forEach(this.toggle, this);
}
toggle(parere: Richiesta, index)
{
if(parere.idRichiesta == this.idSelected)
{
if(parere.checked) parere.checked = false;
else{
parere.checked = true;
this.showButtons();
}
}
else if(parere.checked) this.showButtons();
}
selectItem(id: number) {
// alert ("INsiede item selection");
if(this.clickCheckbox)
{
this.clickCheckbox = false;
return;
}
this.selection = true;
this.idSelected = id;
this.hideButtons()
this.pareri.forEach(this.select, this);
}
select(parere: Richiesta, index)
{
if(parere.idRichiesta == this.idSelected)
{
parere.checked = true;
this.showButtons();
}
}
cercaPareri()
{
this.loadPareri("initial");
......@@ -290,6 +359,7 @@ upload(str:any)
checkSelected(id)
{
this.clickCheckbox = true;
this.richiestaId = id;
this.hideButtons()
this.pareri.forEach(this.check, this);
......@@ -359,6 +429,7 @@ upload(str:any)
}
ngOnInit() {
}
}
......
......@@ -67,6 +67,7 @@ export class SegreteriaPage implements OnInit {
nNotula: string;
fattureSel: Array<Pair>;
tipoStruttura: string;
visualizzaProgetti: boolean;
options : InAppBrowserOptions = {
location : 'yes',//Or 'no'
......@@ -101,9 +102,60 @@ export class SegreteriaPage implements OnInit {
this.nNotula = "";
this.fattureSel = new Array();
this.tipoStruttura = environment.struttura;
this.visualizzaProgetti = false;
}
idSelected: number;
selection: boolean = false;
clickCheckbox: boolean = false;
toggleGroup(id : number)
{
if(this.clickCheckbox)
{
this.clickCheckbox = false;
return;
}
this.selection = true;
this.idSelected = id;
this.hideButtons()
this.fatture.forEach(this.toggle, this);
}
toggle(fattura: Fattura, index)
{
if(fattura.id == this.idSelected)
{
if(fattura.checked) fattura.checked = false;
else{
fattura.checked = true;
this.showButtons();
}
}
else if(fattura.checked) this.showButtons();
}
selectItem(id: number) {
// alert ("INsiede item selection");
if(this.clickCheckbox)
{
this.clickCheckbox = false;
return;
}
this.selection = true;
this.idSelected = id;
this.hideButtons()
this.fatture.forEach(this.select, this);
}
select(fattura: Fattura, index)
{
if(fattura.id == this.idSelected)
{
fattura.checked = true;
this.showButtons();
}
}
condividiFatture()
{
......@@ -142,6 +194,7 @@ export class SegreteriaPage implements OnInit {
checkSelected(id)
{
this.clickCheckbox = true;
this.fatturaId = id;
this.hideButtons()
this.fatture.forEach(this.check, this);
......@@ -156,13 +209,13 @@ export class SegreteriaPage implements OnInit {
showButtons()
{
var buttons = document.getElementById('buttons');
buttons.setAttribute("style", "display:block");
buttons.setAttribute("style", "visibility: visible");
}
hideButtons()
{
var buttons = document.getElementById('buttons');
buttons.setAttribute("style", "display:none");
buttons.setAttribute("style", "visibility: hidden");
}
changeSel(sel)
......@@ -241,9 +294,10 @@ export class SegreteriaPage implements OnInit {
if(isProgNotula) tipo = "P";
else tipo = "N";
var fileUrl = this.httpClientDataService.BASE_ADDRESS+"/intranet/notula.do?idcliente="+AuthService.clienteSelezionato.id+"&idnotula="+idNotula+"&tipo="+tipo;
//this.utilService.downloadDocumento(fileUrl, nomeFile);
nomeFile += ".pdf";
this.utilService.shareDocumento(fileUrl, nomeFile);
this.utilService.downloadDocumento(fileUrl, nomeFile);
/*nomeFile += ".pdf";
this.utilService.shareDocumento(fileUrl, nomeFile);*/
}
getEstrattoConto(idCliente, nomeFile, idStruttura)
......@@ -266,7 +320,7 @@ export class SegreteriaPage implements OnInit {
async redirectTo2p2()
{
var id = await this.authService.getId();
//id = 1096;
id = 1100;
this.segreteriaService.getP2pToken(id).subscribe((res)=>{
var token = res.token;
//window.open(this.httpClientDataService.P2PSingleSignOnUrl+token, "_system");
......
......@@ -8,6 +8,7 @@ import { Router } from "@angular/router";
import { SocialSharing } from '@ionic-native/social-sharing/ngx';
import { TranslateService } from '@ngx-translate/core';
import { Storage } from '@ionic/storage';
import { BehaviorSubject} from 'rxjs';
const delay = ms => new Promise(res => setTimeout(res, ms));
......@@ -42,6 +43,39 @@ export class UtilService {
this.languageSelected = "";
}
async logout() {
const alert = await this.alertController.create({
header: 'Conferma',
message: 'Vuoi davvero uscire?',
buttons: [
{
text: 'No',
role: 'cancel',
handler: () => {
}
},
{
text: 'Si',
handler: () => {
this.logoutUser();
this.router.navigateByUrl('login');
}
}
]
});
alert.present();
}
authSubject = new BehaviorSubject(false);
async logoutUser() {
this.storage.set("logged",false).then((successData)=>{
console.log("Data Stored");
console.log(successData);
})
this.authSubject.next(false);
}
async presentAlert(headerPar, subtitlePar, messagePar, buttonsPar) {
const alert = await this.alertController.create({
......
......@@ -98,5 +98,8 @@
"su_misura":"su misura per te e la tua azienda",
"prenota_app":"PRENOTA IL TUO APPUNTAMENTO!",
"refresh":"Aggiorna",
"apri":"Apri"
"apri":"Apri",
"vedi_documento":"Visualizza Documento",
"visualizza_progetti":"Visualizza Progetti",
"text_data_progetto_notula":"Data Progetto Notula:"
}
\ No newline at end of file
......@@ -676,16 +676,17 @@ ion-menu{
{
text-align: center;
display: inline-block;
margin-right: 5px;
ion-label {
font-size: 14px;
min-width: 52px;
}
ion-icon {
margin-top: 2px;
height: 25px;
color:#515151;
--color: #515151;
width: 45px;
width: 50px;
//margin-right: 10px;
//margin-left: 15px;
display: block;
}
}
......@@ -696,10 +697,11 @@ ion-menu{
margin-right: 5px;
ion-label {
font-size: 14px;
min-width: 52px;
}
ion-icon {
margin-top: 2px;
margin-right: 10px;
//margin-right: 10px;
//margin-left: 15px;
height: 25px;
color:#515151;
--color: #515151;
......@@ -713,7 +715,7 @@ ion-menu{
ion-icon {
color:#515151;
--color: #515151;
width: 25px;
width: 40px;
height: 25px;
}
}
......@@ -751,12 +753,10 @@ ion-menu{
{
text-align: center;
display: inline-block;
margin-right: 5px;
ion-label {
font-size: 14px;
}
ion-icon {
margin-top: 7px;
height: 25px;
color:#515151;
--color: #515151;
......@@ -774,7 +774,6 @@ ion-menu{
font-size: 14px;
}
ion-icon {
margin-top: 7px;
height: 25px;
color:#515151;
--color: #515151;
......@@ -1201,10 +1200,14 @@ ion-menu{
margin-right: 10px;
margin-top: 4px;
}
.check2 {
float: left;
margin-right: 10px;
}
.cerca-notula
{
margin-right: 10px;
width: 110px;
width: 135px;
}
.cerca-titolo
{
......
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