Commit 36993a41 by Matteo

Release del 02/07

parent 7643ddb5
...@@ -8,18 +8,25 @@ ...@@ -8,18 +8,25 @@
<div class="contenitore-home"> <div class="contenitore-home">
<div class="central-doc"> <div class="central-doc">
<ion-grid> <ion-grid>
<ion-row *ngIf="platform.is('desktop')"> <ion-row class="search-date">
<ion-col class="block-date"> <div *ngIf="platform.is('desktop')">
<ion-label floating class="element-date"><strong>Cerca</strong> da</ion-label> <strong>Cerca</strong> da <input type="date" name="calendar" [(ngModel)]="date1"> a <input type="date" name="calendar" [(ngModel)]="date2"> <ion-button (click)="cercaDocumenti()" class="search-arrow"><ion-icon class="button-icon" slot="icon-only" name="arrow-round-forward"></ion-icon></ion-button>
<input floating class="input-date element-date" type="date" name="calendar" [(ngModel)]="date1"> </div>
<ion-label floating class="element-date">a</ion-label> <div *ngIf="!platform.is('desktop')">
<input floating class="element-date input-date" type="date" name="calendar" [(ngModel)]="date2"> <strong>Cerca</strong> da
<ion-button floating fill="clear" class="button-date element-date" (click)="cercaDocumenti()"> <ion-icon floating class="element-date" name="calendar" (click)="setDateDa()"></ion-icon>
<ion-icon class="button-icon" slot="icon-only" name="arrow-round-forward"></ion-icon> <ion-item floating class="element-date">
</ion-button> {{date1}}
</ion-col> </ion-item>
a
<ion-icon floating class="element-date" name="calendar" (click)="setDateA()"></ion-icon>
<ion-item floating class="element-date">
{{date2}}
</ion-item>
<ion-button (click)="cercaDocumenti()" class="search-arrow"><ion-icon class="button-icon" slot="icon-only" name="arrow-round-forward"></ion-icon></ion-button>
</div>
</ion-row> </ion-row>
<ion-row *ngIf="!platform.is('desktop')"> <!--<ion-row class="search-date" *ngIf="!platform.is('desktop')">
<ion-col> <ion-col>
<ion-grid> <ion-grid>
<ion-row text-center center> <ion-row text-center center>
...@@ -33,14 +40,14 @@ ...@@ -33,14 +40,14 @@
<ion-item floating class="element-date"> <ion-item floating class="element-date">
{{date2}} {{date2}}
</ion-item> </ion-item>
<ion-button floating fill="clear" class="button-date element-date" (click)="cercaDocumenti()"> <ion-button floating fill="clear" class="search-arrow" (click)="cercaDocumenti()">
<ion-icon class="button-icon" slot="icon-only" name="arrow-round-forward"></ion-icon> <ion-icon class="button-icon" slot="icon-only" name="arrow-round-forward"></ion-icon>
</ion-button> </ion-button>
</ion-row> </ion-row>
</ion-grid> </ion-grid>
</ion-col> </ion-col>
<ion-col></ion-col> <ion-col></ion-col>
</ion-row> </ion-row>-->
<!--<ion-row> <!--<ion-row>
<ion-col> <ion-col>
<ion-grid> <ion-grid>
......
...@@ -34,8 +34,8 @@ export class DocumentiPage implements OnInit { ...@@ -34,8 +34,8 @@ export class DocumentiPage implements OnInit {
}; };
var date : Date; var date : Date;
date = new Date(); date = new Date();
this.date1 = this.utilService.getDateString(date); this.date1 = "";
this.date2 = this.utilService.getDateString(date); this.date2 = "";
this.events.publish('functionCall:startup', null); this.events.publish('functionCall:startup', null);
if(AuthService.clienteSelezionato.id != null) this.chiediDocumenti("initial"); if(AuthService.clienteSelezionato.id != null) this.chiediDocumenti("initial");
this.events.subscribe('functionCall:clienteCambiato', eventData => { this.events.subscribe('functionCall:clienteCambiato', eventData => {
...@@ -79,10 +79,14 @@ export class DocumentiPage implements OnInit { ...@@ -79,10 +79,14 @@ export class DocumentiPage implements OnInit {
chiediDocumenti(fase) chiediDocumenti(fase)
{ {
this.utilService.showLoading(); this.utilService.showLoading();
var dataA = null;
var dataDa = null;
if(this.date1 != null && this.date1 != "") dataDa = this.utilService.dateFormatConvert(this.date1);
if(this.date2 != null && this.date2 != "") dataA = this.utilService.dateFormatConvert(this.date2);
var request: DocumentiRequest; var request: DocumentiRequest;
this.idCliente = AuthService.clienteSelezionato.id; this.idCliente = AuthService.clienteSelezionato.id;
if(fase == "initial") request = this.docService.createInitialRequest(this.idCliente); if(fase == "initial") request = this.docService.createInitialRequest(this.idCliente);
else request = this.docService.createRequest(this.idCliente,null,null,null,this.utilService.dateFormatConvert(this.date1), this.utilService.dateFormatConvert(this.date2)); else request = this.docService.createRequest(this.idCliente,null,null,null,dataDa, dataA);
this.docService.getDocumenti(request).subscribe((res: DocumentiResponse)=>{ this.docService.getDocumenti(request).subscribe((res: DocumentiResponse)=>{
this.utilService.closeLoading(); this.utilService.closeLoading();
if(res.error){ if(res.error){
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
<ion-content class="menu-content"> <ion-content class="menu-content">
<ion-item class="item-border-grey"> <ion-item class="item-border-grey">
<ion-label class="label-border">Azienda Selezionata:</ion-label> <ion-label class="label-border">Azienda Selezionata:</ion-label>
<ion-select value="clienteSel" [(ngModel)]="clienteSel" (ionChange)="cambiaCliente()" [placeholder]="clienteSelezionato ? clienteSelezionato.denominazione : 'Tap to select..'"> <ion-select value="clienteSel" [(ngModel)]="clienteSel" (ionChange)="cambiaCliente()" interface="popover" [placeholder]="clienteSelezionato ? clienteSelezionato.denominazione : 'Tap to select..'">
<ion-select-option *ngFor="let cliente of clienti; let i=index;" value="{{cliente.id}}">{{cliente.denominazione}}</ion-select-option> <ion-select-option *ngFor="let cliente of clienti; let i=index;" value="{{cliente.id}}">{{cliente.denominazione}}</ion-select-option>
</ion-select> </ion-select>
</ion-item> </ion-item>
......
...@@ -46,6 +46,9 @@ export class IntervistePage implements OnInit { ...@@ -46,6 +46,9 @@ export class IntervistePage implements OnInit {
date1; date1;
date2; date2;
message; message;
intervista;
bottoneVisibile: boolean;
formInserisciIntervento: boolean;
initPage() initPage()
{ {
...@@ -62,15 +65,53 @@ export class IntervistePage implements OnInit { ...@@ -62,15 +65,53 @@ export class IntervistePage implements OnInit {
}; };
var date : Date; var date : Date;
date = new Date(); date = new Date();
this.date1 = this.utilService.getDateString(date); this.date1 = "";
this.date2 = this.utilService.getDateString(date); this.date2 = "";
this.intervista = "lista";
this.bottoneVisibile = true;
this.formInserisciIntervento = false;
}
apriLista()
{
this.intervista = "lista";
this.mostraBottone();
}
nascondiBottone()
{
this.bottoneVisibile = false;
this.hideInputIntervento();
}
mostraBottone()
{
this.bottoneVisibile = true;
}
showInputIntervento()
{
var footer = document.getElementById('footer-interviste');
footer.setAttribute("style", "height:150px");
this.formInserisciIntervento = true;
}
hideInputIntervento()
{
var footer = document.getElementById('footer-interviste');
footer.setAttribute("style", "height:90px");
this.formInserisciIntervento = false;
} }
caricaTopic() caricaTopic()
{ {
var dataA = null;
var dataDa = null;
if(this.date1 != null && this.date1 != "") dataDa = this.utilService.dateFormatConvert(this.date1);
if(this.date2 != null && this.date2 != "") dataA = this.utilService.dateFormatConvert(this.date2);
this.utilService.showLoading(); this.utilService.showLoading();
this.idCliente = AuthService.clienteSelezionato.id; this.idCliente = AuthService.clienteSelezionato.id;
this.intervisteService.getTopic(AuthService.clienteSelezionato.id, this.topicAttivo.idRichiesta, this.utilService.dateFormatConvert(this.date1), this.utilService.dateFormatConvert(this.date2)).subscribe((res: RichiesteResponse)=>{ this.intervisteService.getTopic(AuthService.clienteSelezionato.id, this.topicAttivo.idRichiesta, dataDa, dataA).subscribe((res: RichiesteResponse)=>{
this.utilService.closeLoading(); this.utilService.closeLoading();
if(res.error){ if(res.error){
this.utilService.presentAlert("Errore", "", res.error, ["OK"]); this.utilService.presentAlert("Errore", "", res.error, ["OK"]);
...@@ -113,11 +154,39 @@ export class IntervistePage implements OnInit { ...@@ -113,11 +154,39 @@ export class IntervistePage implements OnInit {
); );
} }
caricaRichieste()
{
var dataA = null;
var dataDa = null;
if(this.date1 != null && this.date1 != "") dataDa = this.utilService.dateFormatConvert(this.date1);
if(this.date2 != null && this.date1 != "") dataA = this.utilService.dateFormatConvert(this.date2);
this.utilService.showLoading();
this.idCliente = AuthService.clienteSelezionato.id;
this.intervisteService.getListaTopics(AuthService.clienteSelezionato.id, dataDa, dataA).subscribe((res: RichiesteResponse)=>{
this.utilService.closeLoading();
if(res.error){
this.utilService.presentAlert("Errore", "", res.error, ["OK"]);
}
else
{
this.topics = res.richieste;
/*if(this.topics != null && this.topics.length > 0 && this.topicAttivo.idRichiesta == null) this.topicAttivo = this.topics[0];
else this.apriTopic(this.topicAttivo.idRichiesta);*/
}
},
(error: ErrorResponse) => {
this.utilService.closeLoading();
if(error != null && error.errorMsg != null) this.utilService.presentAlert("Errore", "", error.errorMsg, ["OK"]);
else if(error!=null) this.utilService.presentAlert("Errore", "", error, ["OK"]);
else this.utilService.presentAlert("Errore", "", "Errore durante la procedura di apertura del Topic", ["OK"]);
});
}
async loadTopics(fase) async loadTopics(fase)
{ {
this.utilService.showLoading(); this.utilService.showLoading();
this.idCliente = AuthService.clienteSelezionato.id; this.idCliente = AuthService.clienteSelezionato.id;
if(fase == "initial") this.intervisteService.getListaTopics(AuthService.clienteSelezionato.id).subscribe((res: RichiesteResponse)=>{ if(fase == "initial") this.intervisteService.getListaTopics(AuthService.clienteSelezionato.id, null, null).subscribe((res: RichiesteResponse)=>{
this.utilService.closeLoading(); this.utilService.closeLoading();
if(res.error){ if(res.error){
this.utilService.presentAlert("Errore", "", res.error, ["OK"]); this.utilService.presentAlert("Errore", "", res.error, ["OK"]);
...@@ -135,7 +204,7 @@ export class IntervistePage implements OnInit { ...@@ -135,7 +204,7 @@ export class IntervistePage implements OnInit {
else if(error!=null) this.utilService.presentAlert("Errore", "", error, ["OK"]); else if(error!=null) this.utilService.presentAlert("Errore", "", error, ["OK"]);
else this.utilService.presentAlert("Errore", "", "Errore durante la procedura di apertura del Topic", ["OK"]); else this.utilService.presentAlert("Errore", "", "Errore durante la procedura di apertura del Topic", ["OK"]);
}); });
if(fase == "after") this.intervisteService.getListaTopics(AuthService.clienteSelezionato.id).subscribe((res: RichiesteResponse)=>{ if(fase == "after") this.intervisteService.getListaTopics(AuthService.clienteSelezionato.id, null, null).subscribe((res: RichiesteResponse)=>{
this.utilService.closeLoading(); this.utilService.closeLoading();
if(res.error){ if(res.error){
this.utilService.presentAlert("Errore", "", res.error, ["OK"]); this.utilService.presentAlert("Errore", "", res.error, ["OK"]);
...@@ -205,6 +274,23 @@ export class IntervistePage implements OnInit { ...@@ -205,6 +274,23 @@ export class IntervistePage implements OnInit {
{ {
this.idSelezionato = id; this.idSelezionato = id;
this.topics.forEach(this.setTopic, this); this.topics.forEach(this.setTopic, this);
this.intervista = "dettaglio";
this.mostraBottone();
}
apriEdit()
{
if(this.intervista == "dettaglio")
{
if(this.formInserisciIntervento) this.hideInputIntervento();
else this.showInputIntervento();
}
if(this.intervista == "lista")
{
this.nascondiBottone();
this.hideInputIntervento();
this.intervista = "new";
}
} }
setTopic(topic, index) setTopic(topic, index)
...@@ -212,7 +298,7 @@ export class IntervistePage implements OnInit { ...@@ -212,7 +298,7 @@ export class IntervistePage implements OnInit {
if(topic.idRichiesta == this.idSelezionato) if(topic.idRichiesta == this.idSelezionato)
{ {
this.topicAttivo = topic; this.topicAttivo = topic;
this.closeSideMenu(); //this.closeSideMenu();
} }
} }
...@@ -242,18 +328,19 @@ export class IntervistePage implements OnInit { ...@@ -242,18 +328,19 @@ export class IntervistePage implements OnInit {
return true; return true;
} }
saveNewTopic(data) saveNewTopic(form)
{ {
this.utilService.showLoading(); this.utilService.showLoading();
this.idCliente = AuthService.clienteSelezionato.id; this.idCliente = AuthService.clienteSelezionato.id;
this.intervisteService.newTopic(this.idCliente, data.title, data.question).subscribe((res: NewRichiestaResponse)=>{ this.intervisteService.newTopic(this.idCliente, form.value.title, form.value.question).subscribe((res: NewRichiestaResponse)=>{
this.utilService.closeLoading(); this.utilService.closeLoading();
if(res.error){ if(res.error){
this.utilService.presentAlert("Errore", "", res.error, ["OK"]); this.utilService.presentAlert("Errore", "", res.error, ["OK"]);
} }
else else
{ {
this.loadTopics("initial"); this.loadTopics("after");
this.apriLista();
} }
}, },
(error: ErrorResponse) => { (error: ErrorResponse) => {
......
<ion-header> <ion-header class="header-subpage" no-border>
<ion-toolbar> <ion-toolbar>
<ion-title>Parere</ion-title> <ion-title class="titolo-sezione-head">voglio un parere</ion-title>
</ion-toolbar> </ion-toolbar>
</ion-header> </ion-header>
<ion-content> <ion-content class="chats">
<ion-menu side="start" menu-id="pareri" content-id="parere"> <div class="contenitore-home">
<div class="central-doc">
<div [ngSwitch]="parere" ngDefaultControl>
<div *ngSwitchCase="'lista'">
<div *ngFor="let parere of pareri; trackBy: trackByDoc" class="chat-list">
<div class="row-chat-list">
<div class="data" text-wrap>
{{parere.data}}
<a class="select" (click)="apriParere(parere.idRichiesta)" tappable>
<ion-icon name="arrow-round-forward"></ion-icon>
</a>
<a class="select" (click)="loadPareri('initial')" tappable>
<ion-icon name="refresh-circle"></ion-icon>
</a>
<div text-wrap>{{parere.titolo}}</div>
</div>
</div>
</div>
<!--<div class="foo-button" center>
<div class="round-btn">
<a (click)="createNuovoParere()" tappable>
<ion-icon name="add" [style.color]="'#FFFFFF'"></ion-icon>
</a>
</div>
</div>-->
</div>
<div *ngSwitchCase="'dettaglio'">
<div class="back">
<a (click)="apriLista()" tappable>
<ion-icon name="arrow-round-back" [style.color]="'#2b94d1'"></ion-icon>
</a>
</div>
<div class="quesito">
{{parereAttivo.titolo}}
</div>
<div class="from-me">
<div class="io">io - {{parereAttivo.data}}</div>
<p>{{parereAttivo.testo}}</p>
<div class="download-doc" *ngIf="parereAttivo.nomeFile != null">
<div class="image">
<a *ngIf="!platform.is('desktop')" (click)="getFile(parereAttivo.idRichiesta, parereAttivo.nomeFile, true);" target="_blank" download><ion-icon name="cloud-download" [style.color]="'#e5e5ea'"></ion-icon></a>
<a *ngIf="platform.is('desktop')" href="{{parereAttivo.url}}" target="_blank" download><ion-icon name="cloud-download" [style.color]="'#e5e5ea'"></ion-icon></a>
</div>
<div class="filename">{{parereAttivo.nomeFile}}</div>
</div>
</div>
<div class="clr"></div>
<div class="from-them" *ngIf="parereAttivo.interventi.length > 0">
<div class="operatore">{{parereAttivo.interventi[0].utente}} - {{parereAttivo.interventi[0].data}}</div>
<p>{{parereAttivo.interventi[0].testo}}</p>
<div *ngIf="parereAttivo.interventi[0].nomeFile != null" class="download-doc">
<div class="image">
<a *ngIf="!platform.is('desktop')" (click)="getFile(parereAttivo.interventi[0].idIntervento, parereAttivo.interventi[0].nomeFile, false);" target="_blank" download><ion-icon name="cloud-download" [style.color]="'#2b94d1'"></ion-icon></a>
<a *ngIf="platform.is('desktop')" href="{{parereAttivo.interventi[0].url}}" target="_blank" download><ion-icon name="cloud-download" [style.color]="'#2b94d1'"></ion-icon></a>
</div>
<div class="filename">{{parereAttivo.interventi[0].nomeFile}}</div>
</div>
</div>
<div class="clr"></div>
</div>
<div *ngSwitchCase="'new'">
<div class="back">
<a (click)="apriLista()" tappable>
<ion-icon name="arrow-round-back" [style.color]="'#2b94d1'"></ion-icon>
</a>
</div>
<div class="clr"></div>
<form #form="ngForm" (ngSubmit)="creaParere(form)">
<div>
<ion-item class="title-question">
<ion-input class="item-no-border" name="title" type="text" placeholder="inserire qui il titolo" ngModel required></ion-input>
</ion-item>
</div>
<div>
<ion-item class="question-extended item-no-border">
<ion-textarea name="question" placeholder="inserire qui la richiesta" ngModel required></ion-textarea>
</ion-item>
</div>
<ion-item class="item-no-border"><h4>Aggiungi Allegato</h4></ion-item>
<div class="clr"></div>
<ion-item class="item-no-border">
<ion-input id="file" type="file" name="file" ngModel (ionChange)="loadFile();"></ion-input>
</ion-item>
<div class="send">
<ion-button type="submit" size="large" [disabled]="form.invalid" expand="block" color="#fcc73d">invia</ion-button>
</div>
<div class="undo">
<ion-button size="large" expand="block" (click)="apriLista()">annulla</ion-button>
</div>
</form>
</div>
</div>
</div>
</div>
<!--<ion-menu side="start" menu-id="pareri" content-id="parere">
<ion-header> <ion-header>
<ion-toolbar color="primary"> <ion-toolbar color="primary">
<ion-title>Topics</ion-title> <ion-title>Topics</ion-title>
...@@ -19,8 +117,13 @@ ...@@ -19,8 +117,13 @@
</div> </div>
</ion-list> </ion-list>
</ion-content> </ion-content>
</ion-menu> </ion-menu>-->
<div class="ion-page" main> <!--<div class="chats" main>
<div class="back">
<a href="">
<ion-icon name="arrow-round-forward" color="#2b94d1"></ion-icon>
</a>
</div>
<ion-content padding id="parere"> <ion-content padding id="parere">
<ion-button expand="block" (click)="openSideMenu()">Apri Lista Pareri</ion-button> <ion-button expand="block" (click)="openSideMenu()">Apri Lista Pareri</ion-button>
<h1>{{parereAttivo.titolo}}</h1> <h1>{{parereAttivo.titolo}}</h1>
...@@ -47,6 +150,16 @@ ...@@ -47,6 +150,16 @@
</div> </div>
</ion-content> </ion-content>
</div> </div>
<div id="modal"></div> <div id="modal"></div>-->
<!--<div id="content"></div>--> <!--<div id="content"></div>-->
</ion-content> </ion-content>
<ion-footer class="footer-parere" no-border *ngIf="bottoneVisibile">
<div class="foo-button" center>
<div class="round-btn">
<a (click)="createNuovoParere()" tappable>
<ion-icon name="add" [style.color]="'#FFFFFF'"></ion-icon>
</a>
</div>
</div>
</ion-footer>
...@@ -11,6 +11,7 @@ import { ParereService } from 'src/app/service/parere.service'; ...@@ -11,6 +11,7 @@ import { ParereService } from 'src/app/service/parere.service';
import { ErrorResponse } from '../../auth/interface/error-response'; import { ErrorResponse } from '../../auth/interface/error-response';
import { NewRichiestaResponse } from 'src/app/interface/new-richiesta-response'; import { NewRichiestaResponse } from 'src/app/interface/new-richiesta-response';
import { Platform, Events, MenuController } from '@ionic/angular'; import { Platform, Events, MenuController } from '@ionic/angular';
import { DataWithFileUploaded } from './../../interface/data-with-file-uploaded';
@Component({ @Component({
selector: 'app-parere', selector: 'app-parere',
...@@ -49,12 +50,17 @@ export class ParerePage implements OnInit { ...@@ -49,12 +50,17 @@ export class ParerePage implements OnInit {
url: null, url: null,
tipo: null tipo: null
}; };
this.parere = "lista";
this.bottoneVisibile = true;
result = {dati: null, file: null};
} }
pareri: Richiesta[]; pareri: Richiesta[];
parereAttivo: Richiesta; parereAttivo: Richiesta;
idCliente; idCliente;
idSelezionato; idSelezionato;
parere: string;
bottoneVisibile: boolean;
getFile(id, nomeFile, richiesta) getFile(id, nomeFile, richiesta)
{ {
...@@ -85,6 +91,12 @@ export class ParerePage implements OnInit { ...@@ -85,6 +91,12 @@ export class ParerePage implements OnInit {
}); });
} }
apriLista()
{
this.parere = "lista";
this.mostraBottone();
}
apriParere(id) apriParere(id)
{ {
this.idSelezionato = id; this.idSelezionato = id;
...@@ -96,10 +108,35 @@ export class ParerePage implements OnInit { ...@@ -96,10 +108,35 @@ export class ParerePage implements OnInit {
if(parere.idRichiesta == this.idSelezionato) if(parere.idRichiesta == this.idSelezionato)
{ {
this.parereAttivo = parere; this.parereAttivo = parere;
this.closeSideMenu(); this.parere = "dettaglio";
this.mostraBottone();
//this.closeSideMenu();
} }
} }
creaParere(form)
{
this.utilService.showLoading();
this.idCliente = AuthService.clienteSelezionato.id;
this.parereService.newParere(this.idCliente, form.value.title, form.value.question, result.file, form.value.file).subscribe((res: NewRichiestaResponse)=>{
this.utilService.closeLoading();
if(res.error){
this.utilService.presentAlert("Errore", "", res.error, ["OK"]);
}
else
{
this.loadPareri("initial");
this.apriLista();
}
},
(error: ErrorResponse) => {
this.utilService.closeLoading();
if(error != null && error.errorMsg != null) this.utilService.presentAlert("Errore", "", error.errorMsg, ["OK"]);
else if(error!=null) this.utilService.presentAlert("Errore", "", error, ["OK"]);
else this.utilService.presentAlert("Errore", "", "Errore durante la procedura di creazione nuovo Topic", ["OK"]);
});
}
async creaModale() async creaModale()
{ {
const modal = await this.modalController.create({ const modal = await this.modalController.create({
...@@ -149,6 +186,16 @@ upload(str:any) ...@@ -149,6 +186,16 @@ upload(str:any)
return await modal.present(); return await modal.present();
} }
nascondiBottone()
{
this.bottoneVisibile = false;
}
mostraBottone()
{
this.bottoneVisibile = true;
}
async canIAskNewParere(): Promise<boolean> async canIAskNewParere(): Promise<boolean>
{ {
this.utilService.showLoading(); this.utilService.showLoading();
...@@ -162,7 +209,9 @@ upload(str:any) ...@@ -162,7 +209,9 @@ upload(str:any)
{ {
if(res.autorizzato) if(res.autorizzato)
{ {
this.creaModale(); //this.creaModale();
this.parere = "new";
this.nascondiBottone();
} }
else{ else{
this.utilService.presentAlert("Avviso", "", "Hai Superato il numero di pareri per te disponibili. Contattare il tuo referente per poter richiedere nuovi pareri", ["OK"]); this.utilService.presentAlert("Avviso", "", "Hai Superato il numero di pareri per te disponibili. Contattare il tuo referente per poter richiedere nuovi pareri", ["OK"]);
...@@ -197,7 +246,28 @@ upload(str:any) ...@@ -197,7 +246,28 @@ upload(str:any)
trackByDoc(index: number, parere: Richiesta): number { return parere.idRichiesta; } trackByDoc(index: number, parere: Richiesta): number { return parere.idRichiesta; }
loadFile()
{
var element : HTMLInputElement = document.querySelector('input[type=file]');
var file: Blob = element.files[0];
var reader = new FileReader();
reader.onloadend = function () {
result.file = reader.result;
};
/*reader.addEventListener("load", function () {
result.file = reader.result;
}, false);*/
if (file) {
reader.readAsDataURL(file);
}
}
ngOnInit() { ngOnInit() {
} }
} }
var result: DataWithFileUploaded;
...@@ -58,8 +58,8 @@ export class SegreteriaPage implements OnInit { ...@@ -58,8 +58,8 @@ export class SegreteriaPage implements OnInit {
this.fatture = []; this.fatture = [];
var date : Date; var date : Date;
date = new Date(); date = new Date();
this.date1 = this.utilService.getDateString(date); this.date1 = "";
this.date2 = this.utilService.getDateString(date); this.date2 = "";
this.segreteria = "fatture"; this.segreteria = "fatture";
this.strutturaSel = null; this.strutturaSel = null;
this.idStrutturaSel = null; this.idStrutturaSel = null;
...@@ -199,10 +199,14 @@ export class SegreteriaPage implements OnInit { ...@@ -199,10 +199,14 @@ export class SegreteriaPage implements OnInit {
loadFatture(fase) loadFatture(fase)
{ {
this.utilService.showLoading(); this.utilService.showLoading();
var dataA = null;
var dataDa = null;
if(this.date1 != null && this.date1 != "") dataDa = this.utilService.dateFormatConvert(this.date1);
if(this.date2 != null && this.date2 != "") dataA = this.utilService.dateFormatConvert(this.date2);
var request: FattureRequest; var request: FattureRequest;
this.idCliente = AuthService.clienteSelezionato.id; this.idCliente = AuthService.clienteSelezionato.id;
if(fase == "initial") request = this.segreteriaService.createFatturaRequest(this.idCliente, 10, null, null); if(fase == "initial") request = this.segreteriaService.createFatturaRequest(this.idCliente, 10, null, null);
else request = this.segreteriaService.createFatturaRequest(this.idCliente,null, this.utilService.dateFormatConvert(this.date1), this.utilService.dateFormatConvert(this.date2)); else request = this.segreteriaService.createFatturaRequest(this.idCliente,null, dataDa, dataA);
this.segreteriaService.getFatture(request).subscribe((res: FattureResponse)=>{ this.segreteriaService.getFatture(request).subscribe((res: FattureResponse)=>{
this.utilService.closeLoading(); this.utilService.closeLoading();
if(res.error){ if(res.error){
......
...@@ -53,9 +53,11 @@ export class IntervisteService { ...@@ -53,9 +53,11 @@ export class IntervisteService {
); );
} }
getListaTopics(idCliente: number): Observable<RichiesteResponse> getListaTopics(idCliente: number, dataDa, dataA): Observable<RichiesteResponse>
{ {
var richiesta = this.creaGetListaRichiesta(idCliente, null, 10, null, null); var limite = null;
if(dataDa == null && dataA == null) limite = 10;
var richiesta = this.creaGetListaRichiesta(idCliente, null, limite, dataDa, dataA);
var param = this.encodeBody(richiesta); var param = this.encodeBody(richiesta);
return this.httpClient.post<RichiesteResponse>(this.httpClientDataService.BASE_ADDRESS+'/intranet/richieste.do', param, this.httpClientDataService.httpOptionsJson) return this.httpClient.post<RichiesteResponse>(this.httpClientDataService.BASE_ADDRESS+'/intranet/richieste.do', param, this.httpClientDataService.httpOptionsJson)
.pipe( .pipe(
......
...@@ -25,9 +25,11 @@ export class UtilService { ...@@ -25,9 +25,11 @@ export class UtilService {
private fileOpener: FileOpener, private fileOpener: FileOpener,
private router: Router private router: Router
) { ) {
this.loaders = new Array();
this.loader = this.loadingCtrl.create({ this.loader = this.loadingCtrl.create({
message: "Please wait...", message: "Please wait...",
}); });
this.loaders.push(this.loader);
} }
async presentAlert(headerPar, subtitlePar, messagePar, buttonsPar) { async presentAlert(headerPar, subtitlePar, messagePar, buttonsPar) {
...@@ -42,15 +44,18 @@ export class UtilService { ...@@ -42,15 +44,18 @@ export class UtilService {
} }
loader; loader;
loaders;
async showLoading() { async showLoading() {
this.loader = await this.loadingCtrl.create({ this.loader = await this.loadingCtrl.create({
message: "Please wait...", message: "Please wait...",
}); });
this.loaders.push(this.loader);
return await this.loader.present(); return await this.loader.present();
} }
closeLoading() { closeLoading() {
this.loader = this.loaders.pop();
this.loader.dismiss(); this.loader.dismiss();
} }
......
...@@ -20,6 +20,7 @@ $giallo: #fcc73d; ...@@ -20,6 +20,7 @@ $giallo: #fcc73d;
$grigio: #515151; $grigio: #515151;
$nero: #000000; $nero: #000000;
$grigio-lite: #aeaeae; $grigio-lite: #aeaeae;
$grigio-superlite: #e5e5ea;
ion-title{ ion-title{
top: 0; top: 0;
...@@ -358,6 +359,44 @@ strong { ...@@ -358,6 +359,44 @@ strong {
} }
} }
.button-icon
{
color: #000000;
}
.button-date
{
border: 0px !important;
border-color: transparent !important;
background: transparent !important;
padding-bottom: 18px;
}
.input-date
{
//border: 0px !important;
border-top-color: transparent !important;
border-right-color: transparent !important;
border-left-color: transparent !important;
border-bottom-color: $grigio-lite;
}
.element-date
{
margin-right: 2px;
}
.block-date > *
{
font-family: 'futura-pt', sans-serif;
@media (min-width: 474px) {
font-size: 16px;
}
@media (max-width: 475px) {
font-size: 10px;
}
}
.blu { .blu {
color: $celeste; color: $celeste;
} }
...@@ -366,7 +405,7 @@ strong { ...@@ -366,7 +405,7 @@ strong {
{ {
border: 0px !important; border: 0px !important;
border-bottom-color: transparent !important; border-bottom-color: transparent !important;
border-bottom: none !important; border-bottom: none !important;
} }
.header { .header {
...@@ -425,11 +464,19 @@ strong { ...@@ -425,11 +464,19 @@ strong {
--color:#2b94d1 !important; --color:#2b94d1 !important;
}*/ }*/
.header-grid { .header-grid, .header-subpage {
background-color:$celeste; background-color:$celeste;
--ion-background-color: $celeste; --ion-background-color: $celeste;
} }
.header-grid {
height: 70px;
}
.header-subpage {
height: 50px;
}
.contenitore-home { .contenitore-home {
@media (max-width: 991px) { @media (max-width: 991px) {
max-width: 95%; max-width: 95%;
...@@ -439,6 +486,10 @@ strong { ...@@ -439,6 +486,10 @@ strong {
margin: auto; margin: auto;
} }
align-content: center; align-content: center;
.central-doc{
margin-top: 20px;
margin-left: 20px;
}
.central-home { .central-home {
@media (min-height: 480px) and (min-width: 991px) { @media (min-height: 480px) and (min-width: 991px) {
margin-top: 20%; margin-top: 20%;
...@@ -449,7 +500,12 @@ strong { ...@@ -449,7 +500,12 @@ strong {
margin-left: 20px; margin-left: 20px;
} }
.box { .box {
width: 140px; @media (min-width: 360px) {
width: 140px;
}
@media (max-width: 360px) {
width: 120px;
}
margin: 5px 10px 5px 5px; margin: 5px 10px 5px 5px;
border: 1px solid $grigio-lite; border: 1px solid $grigio-lite;
-webkit-box-shadow: 0px 3px 4px 0px rgba(184,184,184,1); -webkit-box-shadow: 0px 3px 4px 0px rgba(184,184,184,1);
...@@ -496,6 +552,28 @@ strong { ...@@ -496,6 +552,28 @@ strong {
color: $bianco; color: $bianco;
} }
.item-border-grey
{
//height: 50px;
//font-size: 12px;
color: $bianco;
//margin-right: auto;
}
.titolo-sezione-head {
text-align: center;
font-weight: bold;
font-size: 20px;
font-family: 'futura-pt', sans-serif;
@media (min-width: 1080px) {
margin-top: 10px;
}
@media (max-width: 1080px) {
margin-top: 5px;
}
color: $bianco;
}
.menu-toolbar .menu-toolbar
{ {
--border-color: transparent!important; --border-color: transparent!important;
...@@ -511,12 +589,6 @@ ion-menu{ ...@@ -511,12 +589,6 @@ ion-menu{
} }
} }
.item-border-grey
{
height: 50px;
font-size: 12px;
}
.menu-title .menu-title
{ {
font-size: 18px; font-size: 18px;
...@@ -525,7 +597,424 @@ ion-menu{ ...@@ -525,7 +597,424 @@ ion-menu{
color: $bianco; color: $bianco;
} }
.footer-tabs .row-results {
padding: 10px 0px;
margin: 5px 0px;
border-bottom: 1px solid $grigio-lite;
//overflow: hidden;
.table-row {
.row-text {
font-size: 18px;
display:inline-block;
text-align: left;
.detail {
font-size: 16px;
}
}
.row-download {
float: right;
ion-icon {
color: #2b94d1;
width: 30px;
}
}
.row-download-special {
float: right;
overflow: hidden;
.group-icon {
text-align: center;
display: inline-block;
margin-right: 5px;
ion-label {
font-size: 12px;
}
ion-icon {
width: 45px;
display: block;
margin:auto;
color: #2b94d1;
}
}
}
.row-text-special {
font-size: 18px;
.detail {
font-size: 12px;
}
}
}
}
.footer-tabs{
height: 60px;
@media (max-width: 991px) {
max-width: 100%;
}
@media (min-width: 992px) {
max-width: 56%;
margin: auto;
}
background-color: $giallo;
}
.footer{
margin-bottom: 5px;
}
.footer-toolbar, .footer-toolbar > *{
--color:rgb(81, 81, 81);
color:rgb(81, 81, 81) ;
background-color: transparent!important;
--background: transparent!important;
}
.footer-tabbar {
@media (max-width: 1080px) {
display: flex;
min-height: 60px;
ion-tab-button {
display: inline-block !important;
//min-width: 80px !important;
width: auto !important;
--padding-start: 0px;
ion-label {
font-size: 10px;
}
}
}
--color-selected: $bianco;
color: rgb(81, 81, 81);
}
.icon-footer {
width: 35px;
height: 35px;
}
.title-infra {
font-weight: bold;
text-align: center;
font-size:24px;
margin-bottom: 5px;
color:rgb(81, 81, 81);
}
.selection {
font-size:18px;
font-family: 'futura-pt', sans-serif;
--ion-font-family: 'futura-pt', sans-serif;
margin-left: 0px;
border: 0px;
padding-left: 0px;
}
.download {
float:right;
ion-icon {
width: 30px;
}
}
.selection-done {
overflow: hidden;
width: 80%;
font-size: 20px;
font-family: 'futura-pt', sans-serif;
}
.download-icon {
width: 30px;
height: 30px;
}
.grigio {
color:rgb(81, 81, 81);
}
.margin-top {
margin-top: 10px;
}
.chats {
margin-top:10px;
.quesito {
font-weight: bold;
margin: 10px 0px 35px;
text-align: center;
font-size:18px;
line-height: 28px;
font-family: 'futura-pt', sans-serif;
color: $grigio;
margin-right: 35px;
}
.back {
ion-icon {
width: 30px;
height: 30px;
}
position:relative;
float:left;
}
.from-me {
.io{
font-size:14px;
color:$bianco;
}
position: relative;
padding: 10px 20px;
color: $bianco;
font-size: 18px;
background: $celeste;
border-radius: 25px;
float: right;
margin-bottom: 10px;
margin-left: 20px;
&:before {
content: "";
position: absolute;
z-index: 2;
bottom: -2px;
right: -7px;
height: 20px;
border-right: 20px solid $celeste;
border-bottom-left-radius: 16px 14px;
-webkit-transform: translate(30, -2px);
}
&:after {
content: "";
position: absolute;
z-index: 3;
bottom: -2px;
right: -56px;
width: 26px;
height: 20px;
background: white;
border-bottom-left-radius: 10px;
-webkit-transform: translate(-30px, -2px);
}
p {
margin: 0px;
}
}
.from-them {
.operatore{
font-size:14px;
}
position: relative;
padding: 10px 20px;
background: $grigio-superlite;
border-radius: 25px;
color: black;
float: left;
font-size: 18px;
margin-bottom:10px;
margin-right: 20px;
&:before {
content: "";
position: absolute;
z-index: 2;
bottom: -2px;
left: -7px;
height: 20px;
border-left: 20px solid $grigio-superlite;
border-bottom-right-radius: 16px 14px;
-webkit-transform: translate(0, -2px);
}
&:after {
content: "";
position: absolute;
z-index: 3;
bottom: -2px;
left: 4px;
width: 26px;
height: 20px;
background: white;
border-bottom-right-radius: 10px;
-webkit-transform: translate(-30px, -2px);
}
p {
margin: 0px;
}
}
.chat-list {
border-bottom: 1px solid $grigio-lite;
}
.row-chat-list {
border-bottom: $grigio-superlite;
font-size: 18px;
padding: 10px 0px;
font-weight: bold;
color:#515151;
--color: #515151;
.select{
float:right;
ion-icon {
color:#515151;
--color: #515151;
width: 30px;
height: 30px;
}
}
.data {
div {
font-size: 18px;
font-weight: bold;
border-bottom: $grigio-superlite;
}
font-size: 14px;
font-weight: 400;
}
}
.download-doc {
margin-top:5px;
.image {
//display:inline-block;
float: left;
margin-right: 5px;
ion-icon {
width: 30px;
height: 30px;
}
}
.filename {
//display:inline-block;
float: left;
height: 30px;
}
}
.title-question {
ion-input[type=text] {
border: none;
//border-bottom: 1px solid $grigio-superlite;
font-family: 'futura-pt', sans-serif;
width: 100%;
font-size: 18px;
}
}
.question-extended {
margin-top:20px;
border: 1px solid $grigio-superlite;
ion-textarea {
//border: 1px solid $grigio-superlite;
font-size: 18px;
font-family: 'futura-pt', sans-serif;
width: 295px;
min-height: 80px;
}
}
.send {
ion-button {
margin-top: 10px;
background-color: $giallo;
--backgroud: $giallo;
color: #000000;
//padding: 10px 0px;
width: 100%;
font-size: 18px;
font-weight: bold;
border:none;
//margin: 15px 0px;
}
}
.undo {
ion-button {
margin-top: 10px;
--background: #e5e5ea;
color: #000000;
//padding: 10px 0px;
width: 100%;
font-size: 18px;
font-weight: bold;
border:none;
}
}
}
.clr {
clear:both;
}
.foo-button {
//position: ;
bottom: 0;
z-index: 5;
padding: 10px 0px 20px;
background: rgba(255,255,255, 0.6);
.round-btn {
border-radius: 50%;
background: $celeste;
border: 2px solid $bianco;
margin: auto;
display: block;
text-align:center;
width:75px;
height: 75px;
margin-top: 0px;
ion-icon {
width: 50px;
height: 50px;
margin:auto;
display: block;
padding-top:12px;
}
}
}
.footer-parere {
height: 90px;
@media (max-width: 991px) {
max-width: 100%;
}
@media (min-width: 992px) {
max-width: 56%;
margin: auto;
}
}
.search-date {
font-size: 15px;
border-bottom: 1px solid $grigio-superlite;
padding-bottom: 15px;
margin-bottom: 5px;
input[type=input] {
font-size: 15px;
display: inline-block;
border: none;
border-bottom: 1px solid $grigio-superlite;
width: 87px;
}
.search-arrow {
margin-left: 10px;
margin-top: 0px;
background: $giallo;
--background: $giallo;
border: 0px;
height: 24px;
width: 41px;
}
}
.input-intervento
{
border-bottom: 1px solid $grigio-superlite;
}
.popover-content {
@media (min-width: 600px) {
--min-width: 400px;
}
@media (max-width: 600px) {
--min-width: 100%;
}
}
.popover-content.sc-ion-popover-md
{ {
height: 55px; overflow-x: scroll;
} }
\ No newline at end of file
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>Intranet</title> <title>Intranet</title>
<!--Non funziona con il deploy desktop ma permette di ripartire da qualsiasi pagina, non solo dalla home-->
<!--<base href="/" />-->
<!--In caso di deploy per Desktop--> <!--In caso di deploy per Desktop-->
<!--<base href="/intranet/" />--> <!--<base href="/intranet/" />-->
......
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