This commit is contained in:
Eudes Inácio
2021-06-28 13:36:46 +01:00
21 changed files with 265 additions and 301 deletions
+37 -5
View File
@@ -4624,6 +4624,16 @@
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
"dev": true
},
"bindings": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
"dev": true,
"optional": true,
"requires": {
"file-uri-to-path": "1.0.0"
}
},
"bl": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
@@ -8265,9 +8275,9 @@
}
},
"cordova-plugin-mfp-push": {
"version": "8.0.2020072705",
"resolved": "https://registry.npmjs.org/cordova-plugin-mfp-push/-/cordova-plugin-mfp-push-8.0.2020072705.tgz",
"integrity": "sha512-aA7EAZnFgu8R5U+Vpt5fGbCq1lRYHrt9AXXEJMwc5Vv0sFVUz9iOyzMXHYuSFSqmYgW/XldRXgTxoc8UvXErcQ==",
"version": "8.0.2021062405",
"resolved": "https://registry.npmjs.org/cordova-plugin-mfp-push/-/cordova-plugin-mfp-push-8.0.2021062405.tgz",
"integrity": "sha512-OOSV4TCkZVNfwQzjfbsD0ycNcZyokKdBPJnEK/QrtrGtEA+Ah1R86FphXFNJtCWEQYybCCHvCVXgor4Pgf11xQ==",
"dev": true
},
"cordova-plugin-okhttp": {
@@ -10286,6 +10296,13 @@
}
}
},
"file-uri-to-path": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
"dev": true,
"optional": true
},
"fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
@@ -13512,6 +13529,13 @@
"resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
"integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA=="
},
"nan": {
"version": "2.14.2",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz",
"integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==",
"dev": true,
"optional": true
},
"nanoid": {
"version": "3.1.23",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.23.tgz",
@@ -19882,7 +19906,11 @@
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
"dev": true,
"optional": true
"optional": true,
"requires": {
"bindings": "^1.5.0",
"nan": "^2.12.1"
}
},
"glob-parent": {
"version": "3.1.0",
@@ -20508,7 +20536,11 @@
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
"dev": true,
"optional": true
"optional": true,
"requires": {
"bindings": "^1.5.0",
"nan": "^2.12.1"
}
},
"glob-parent": {
"version": "3.1.0",
+1 -1
View File
@@ -108,7 +108,7 @@
"cordova-plugin-ionic-keyboard": "^2.2.0",
"cordova-plugin-ionic-webview": "^4.2.1",
"cordova-plugin-mfp": "^8.0.2021031007",
"cordova-plugin-mfp-push": "^8.0.2020072705",
"cordova-plugin-mfp-push": "^8.0.2021062405",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.4",
@@ -29,7 +29,7 @@
</div>
<div class="ion-input-class">
<ion-select class="d-block d-md-none" placeholder="Prazo*" [(ngModel)]="postData.Priority" interface="action-sheet" Cancel-text="Cancelar" required>
<ion-select class="d-block d-md-none" [(ngModel)]="postData.Priority" interface="action-sheet" Cancel-text="Cancelar" required>
<ion-select-option value="99999861"><b>Normal</b> (4 dias para a execução da tarefa)</ion-select-option>
<ion-select-option value="99999862"><b>Urgente</b> (2 dias para a execução da tarefa)</ion-select-option>
<ion-select-option value="99999863"><b>Muito Urgente</b> (1 dia para a execução da tarefa)</ion-select-option>
@@ -37,7 +37,7 @@
</ion-select>
<mat-form-field class="width-100 d-none d-md-block" floatLabel="never" required>
<mat-select placeholder="Prazo*" matInput [(value)]="postData.Priority" >
<mat-select matInput [(ngModel)]="postData.Priority" >
<mat-option value="99999861">
Normal
</mat-option>
@@ -54,7 +54,6 @@ export class CreateProcessPage implements OnInit {
taskDate: Date;
taskDescription: string;
user: string;
loadedAttachments:any;
subjectTypes:any;
selectedTypes: string[]=[];
@@ -91,7 +90,6 @@ export class CreateProcessPage implements OnInit {
private toastService: ToastService,
) {
this.loggeduser = userAuth.ValidatedUser;
this.user = environment.defaultuser +'@'+ environment.domain;
this.task = this.navParams.get('task');
console.log('task', this.task)
@@ -180,6 +178,8 @@ export class CreateProcessPage implements OnInit {
}
let attendees = this.taskParticipants.concat(this.taskParticipantsCc);
console.log(attendees);
attendees = attendees.map(function(val) {
return {
UserEmail: val.EmailAddress,
@@ -187,6 +187,8 @@ export class CreateProcessPage implements OnInit {
};
});
console.log(attendees);
const DocumentToSave = this.documents.map((e) => {
return {
ApplicationId: e.ApplicationType,
@@ -204,7 +206,7 @@ export class CreateProcessPage implements OnInit {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.user,
UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
}
@@ -223,7 +225,7 @@ export class CreateProcessPage implements OnInit {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.user,
UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
}
@@ -243,7 +245,7 @@ export class CreateProcessPage implements OnInit {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.user,
UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
}
@@ -273,7 +275,7 @@ export class CreateProcessPage implements OnInit {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.user,
UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
}
@@ -292,7 +294,7 @@ export class CreateProcessPage implements OnInit {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.user,
UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
}
@@ -313,7 +315,7 @@ export class CreateProcessPage implements OnInit {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.user,
UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
}
@@ -30,6 +30,7 @@ constructor(
private activatedRoute: ActivatedRoute,
) {
this.activatedRoute.queryParams.subscribe(params => {
console.log('Cria');
if(params['segment'] == 'validar') {
this.segment = 'validar';
@@ -42,12 +43,15 @@ constructor(
}
ngOnInit() {
this.LoadList();
this.router.events.forEach((event) => {
if(event instanceof NavigationEnd && event.url == this.router.url) {
console.log('Atualiza');
this.LoadList();
}
});
console.log('Init');
this.LoadList();
}
segmentChanged(ev: any) {
@@ -10,7 +10,7 @@
<div class="overflow-y-auto content-default-padding">
<div class="ion-item-container width-100">
<ion-input placeholder="Assunto" [(ngModel)]="postData.Subject"></ion-input>
<ion-input placeholder="Assunto*" [(ngModel)]="postData.Subject"></ion-input>
</div>
<div class="container-div width-100">
@@ -19,7 +19,7 @@
<ion-icon slot="start" src="assets/images/icons-location.svg"></ion-icon>
</div>
<div class="ion-input-class">
<ion-input placeholder="Localização" [(ngModel)]="postData.Location"></ion-input>
<ion-input placeholder="Localização*" [(ngModel)]="postData.Location"></ion-input>
</div>
</div>
<!-- Error messages -->
@@ -46,8 +46,8 @@
</ion-select>
<mat-form-field class="d-none d-md-block width-100" placeholder="Selecione agenda">
<mat-select [(value)]="postData.CalendarName" >
<mat-form-field class="d-none d-md-block width-100">
<mat-select placeholder="Selecione agenda" [(ngModel)]="postData.CalendarName" >
<mat-option value="Oficial">
Oficial
</mat-option>
@@ -169,7 +169,7 @@
interface="action-sheet"
required
>
<mat-select [(value)]="postData.IsRecurring" placeholder="Selecione repetição*">
<mat-select placeholder="Selecione repetição*" [(ngModel)]="postData.IsRecurring" >
<mat-option value="false">
Não se repete
</mat-option>
@@ -288,7 +288,7 @@
</ion-content>
<ion-footer>
<div class="buttons">
<button class="btn-cancel" shape="round" (click)="cancelTask()">Cancelar</button>
<button class="btn-cancel" shape="round" (click)="close()">Cancelar</button>
<button class="btn-ok" shape="round" (click)="saveTask()">Gravar</button>
</div>
</ion-footer>
@@ -129,8 +129,6 @@ export class BookMeetingModalPage implements OnInit {
ngOnInit() {
this.adding = "intervenient";
console.log(this.task);
this.getAttachments();
}
@@ -141,12 +139,9 @@ export class BookMeetingModalPage implements OnInit {
}
close(){
this.router.navigate(['/home/gabinete-digital/expediente']);
this.modalController.dismiss(null);
}
cancelTask(){
this.modalController.dismiss(null);
}
goBack() {
this.modalController.dismiss(null);
let navigationExtras: NavigationExtras = {
@@ -161,8 +156,6 @@ export class BookMeetingModalPage implements OnInit {
}
}
async saveTask(){
console.log('HERE');
// issue12323423
let Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
@@ -235,10 +228,7 @@ export class BookMeetingModalPage implements OnInit {
} catch (error) {
this.toastService.badRequest()
}
}
}
async addParticipants(){
@@ -323,7 +313,6 @@ export class BookMeetingModalPage implements OnInit {
});
await modal.present();
modal.onDidDismiss();
}
@@ -348,11 +337,8 @@ export class BookMeetingModalPage implements OnInit {
}
removeAttachment(index: number){
this.documents = this.documents.filter( (e, i) => index != i);
}
validateFormInputs(){
let formLocation = this.postData.Location.trim();
@@ -366,12 +352,10 @@ export class BookMeetingModalPage implements OnInit {
this.taskParticipantsCc = taskParticipantsCc;
}
goToGabinete() {
this.router.navigate(['/home/gabinete-digital']);
}
setIntervenient(data){
this.taskParticipants = data;
}
@@ -43,7 +43,7 @@
</ion-select>
<mat-form-field appearance="fill" class="width-100 d-none d-md-block">
<mat-select [(value)]="postData.Priority">
<mat-select placeholder="Prazo*" [(ngModel)]="postData.Priority">
<mat-option [value]="99999861"><b>Normal</b> (4 dias para a execução da tarefa)</mat-option>
<mat-option [value]="99999862"><b>Urgente</b> (2 dias para a execução da tarefa)</mat-option>
<mat-option [value]="99999863"><b>Muito Urgente</b> (1 dia para a execução da tarefa)</mat-option>
@@ -63,7 +63,6 @@
<ion-item
class="ion-no-border ion-no-padding ion-no-margin d-md-none">
<ion-select
placeholder="Selecione o tipo"
[(ngModel)]="selectedTypes"
(ngModelChange)="onSelectedTypesChanged($event)"
multiple="true" interface="alert" Cancel-text="Cancelar" required>
@@ -71,11 +70,11 @@
</ion-select>
</ion-item>
<mat-form-field
floatLabel="never"
<mat-form-field
floatLabel="never"
appearance="fill"
class="width-100 d-none d-md-block">
<mat-select [formControl]="toppings" multiple` placeholder="Selecione o tipo">
<mat-select [formControl]="toppings" multiple placeholder="Selecione o tipo de evento*">
<mat-option *ngFor="let type of subjectTypes" [value]="type.Code">{{type.Description}}</mat-option>
</mat-select>
</mat-form-field>
@@ -60,7 +60,6 @@ export class ExpedientTaskModalPage implements OnInit {
taskDate: Date;
taskDescription: string;
user: string;
loadedAttachments:any;
documents:SearchDocument[] = [];
@@ -105,7 +104,6 @@ export class ExpedientTaskModalPage implements OnInit {
) {
this.loggeduser = userAuth.ValidatedUser;
this.user = environment.defaultuser +'@'+ environment.domain;
this.task = this.navParams.get('task');
console.log('task', this.task)
@@ -230,7 +228,7 @@ export class ExpedientTaskModalPage implements OnInit {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.user,
UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
AttachmentList: docs,
@@ -261,7 +259,7 @@ export class ExpedientTaskModalPage implements OnInit {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.user,
UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
AttachmentList: docs
@@ -289,7 +287,7 @@ export class ExpedientTaskModalPage implements OnInit {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.user,
UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
AttachmentList: docs
@@ -325,7 +323,7 @@ export class ExpedientTaskModalPage implements OnInit {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.user,
UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
AttachmentList: docs,
@@ -356,7 +354,7 @@ export class ExpedientTaskModalPage implements OnInit {
DistributionType: "Paralelo",
CountryCode: 'AO',
Priority: this.postData.Priority,
UserEmail: this.user,
UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
AttachmentList: docs
@@ -150,15 +150,14 @@
<app-empty-container [texto]="emptyTextDescription" *ngIf="showEmptyContainer" class="d-flex height-100 flex-column"></app-empty-container>
<app-events-to-approve [profile]="'MDGPR'" *ngIf="showEventsToApprove" class="d-flex height-100 flex-column"></app-events-to-approve>
<app-expedients (openExpedientDetail)="openExpedientPage($event)" [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showExpedients"></app-expedients>
<app-expediente (openExpedientList)="openExpedientListPage()" [profile]="profile" [serialNumber]="serialNumber" class="d-flex height-100 flex-column" *ngIf="showExpedientDetail"></app-expediente>
<app-pedidos (openPedido)="openExpedientPage($event)" [profile]="profile" [segment]="segment" [serialNumber]="serialNumber" class="d-flex height-100 flex-column" *ngIf="showPedidos"></app-pedidos>
<app-despachos (openExpedientDetail)="openExpedientPage($event)" [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showDespachos"></app-despachos>
<app-despachos-pr (openExpedientDetail)="openExpedientPage($event)" [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showDespachosPr"></app-despachos-pr>
<app-pendentes (openExpedientDetail)="openExpedientPage($event)" [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showPendentes"></app-pendentes>
<app-expedients [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showExpedients"></app-expedients>
<app-pedidos [profile]="profile" [segment]="segment" [serialNumber]="serialNumber" class="d-flex height-100 flex-column" *ngIf="showPedidos"></app-pedidos>
<app-despachos [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showDespachos"></app-despachos>
<app-despachos-pr [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showDespachosPr"></app-despachos-pr>
<app-pendentes [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showPendentes"></app-pendentes>
<app-diplomas (openExpedientDetail)="openExpedientesPrPage($event)" [profile]="profile" [segment]="segment" class="d-flex height-100 flex-column" *ngIf="showDiplomas"></app-diplomas>
<app-diplomas-assinar class="d-flex height-100 flex-column" *ngIf="showDiplomasAssinar"></app-diplomas-assinar>
<app-expedientes-pr (openExpedientDetail)="openExpedientPage($event)" [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showExpedientesPr"></app-expedientes-pr>
<app-expedientes-pr [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showExpedientesPr"></app-expedientes-pr>
<app-signed-diploma [profile]="profile" class="d-flex height-100 flex-column" *ngIf="showSignedDiploma"></app-signed-diploma>
</div>
</div>
@@ -333,26 +333,6 @@ export class GabineteDigitalPage implements OnInit {
//this.eventsToApprove.doRefresh();
}
}
async openEventsToApproveList(profile:any) {
this.closeAllDesktopComponent();
//if( window.innerWidth <= 1024){
const modal = await this.modalController.create({
component: EventListPage,
componentProps:{
profile: profile,
},
cssClass: 'modal modal-desktop',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss();
//} else {
//this.desktopComponent.showEventList = true;
//}
}
openExpedientListPage() {
this.closeAllDesktopComponents();
@@ -385,23 +365,9 @@ export class GabineteDigitalPage implements OnInit {
}
openExpedientPage(data){
console.log(data);
this.closeAllDesktopComponents();
if( window.innerWidth <= 800){
//this.openExpedientList();
}
else{
this.serialNumber = data;
this.showExpedientDetail = true;
}
}
openPedidosPage(segment:string) {
this.closeAllDesktopComponents();
if( window.innerWidth <= 800) {
//this.openPedidoList();
let navigationExtras: NavigationExtras;
@@ -424,7 +390,6 @@ export class GabineteDigitalPage implements OnInit {
openDespachosPage(segment?:string) {
this.closeAllDesktopComponents();
if( window.innerWidth <= 800){
//this.openDespachoList();
this.router.navigate(['/home/gabinete-digital/despachos']);
}
else{
@@ -437,7 +402,6 @@ export class GabineteDigitalPage implements OnInit {
openDespachosPrPage(segment?:string) {
this.closeAllDesktopComponents();
if( window.innerWidth <= 800){
//this.openDespachoListPr();
this.router.navigate(['/home/gabinete-digital/despachos-pr']);
}
else{
@@ -450,7 +414,6 @@ export class GabineteDigitalPage implements OnInit {
openPendentesPage(segment?:string){
this.closeAllDesktopComponents();
if( window.innerWidth <= 800){
//this.openPendenteList();
this.router.navigate(['/home/gabinete-digital/pendentes']);
}
else{
@@ -463,7 +426,6 @@ export class GabineteDigitalPage implements OnInit {
openExpedientesPrPage(segment?:string){
this.closeAllDesktopComponents();
if( window.innerWidth <= 800) {
//this.openExpedientList();
this.router.navigate(['/home/gabinete-digital/expedientes-pr']);
}
else {
@@ -479,7 +441,6 @@ export class GabineteDigitalPage implements OnInit {
this.closeAllDesktopComponents();
if( window.innerWidth <= 800){
//this.openDeploma();
let navigationExtras: NavigationExtras = { queryParams: {"segment": segment}};
this.router.navigate(['/home/gabinete-digital/diplomas'], navigationExtras);
}
@@ -496,7 +457,6 @@ export class GabineteDigitalPage implements OnInit {
if (this.loggeduser.Profile == 'MDGPR') {
if( window.innerWidth <= 800){
//this.openDeploma();
let navigationExtras: NavigationExtras = { queryParams: {"segment": 'assinados',}};
this.router.navigate(['/home/gabinete-digital/diplomas'], navigationExtras);
}
@@ -507,7 +467,6 @@ export class GabineteDigitalPage implements OnInit {
}
} else {
if( window.innerWidth <= 800){
//this.openDeploma();
let navigationExtras: NavigationExtras = { queryParams: {"segment": 'assinados',}};
this.router.navigate(['/home/gabinete-digital/diplomas-assinar'], navigationExtras);
}
@@ -517,109 +476,6 @@ export class GabineteDigitalPage implements OnInit {
this.showDiplomasAssinar = true;
}
}
}
openSignedDiploma(segment:string) {
this.closeAllDesktopComponents();
if( window.innerWidth <= 800){
this.openDeploma();
}
else{
this.segment = segment;
this.showSignedDiploma = true;
}
}
async openDeploma() {
const modal = await this.modalController.create({
component: DiplomasPage,
componentProps:{
profile: this.profile,
},
cssClass: 'modal modal-desktop',
//backdropDismiss: false
});
await modal.present();
modal.onDidDismiss();
}
async openExpedientList(){
this.closeAllDesktopComponent();
//if( window.innerWidth <= 1024){
const modal = await this.modalController.create({
component: ExpedientePage,
componentProps: {
profile: this.profile,
},
cssClass: 'modal modal-desktop',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss();
//} else {
console.log('show desktop modal')
//this.desktopComponent.showExpediente = true;
//}
}
/* async openPendenteList(){
this.closeAllDesktopComponent();
const modal = await this.modalController.create({
component: PendentesPage,
componentProps:{
profile: this.profile,
},
cssClass: 'modal modal-desktop',
});
await modal.present();
modal.onDidDismiss();
console.log('show desktop modal')
} */
async openDespachoList(){
this.closeAllDesktopComponent();
const modal = await this.modalController.create({
component: DespachosPage,
componentProps:{
profile: this.profile,
serialNumber: this.serialNumber
},
cssClass: 'modal modal-desktop',
});
await modal.present();
modal.onDidDismiss();
console.log('show desktop modal')
}
async openDespachoListPr(){
this.closeAllDesktopComponent();
const modal = await this.modalController.create({
component: DespachosPrPage,
componentProps:{
profile: this.profile,
},
cssClass: 'modal modal-desktop',
});
await modal.present();
modal.onDidDismiss();
console.log('show desktop modal')
}
async openPedidoList(){
this.closeAllDesktopComponent();
const modal = await this.modalController.create({
component: PedidosPage,
componentProps:{
profile: this.profile,
},
cssClass: 'modal modal-desktop',
});
await modal.present();
modal.onDidDismiss();
console.log('show desktop modal')
}
}
+64 -65
View File
@@ -1,86 +1,85 @@
<ion-content class="text-white">
<div class="main-wrapper">
<div class="wrapper" *ngIf="userLoginPreference != 'pin' && userLoginPreference != 'fingerprint' && !setPint ">
<div class="wrapper" *ngIf="userLoginPreference != 'pin' && userLoginPreference != 'fingerprint' && !setPint ">
<div class="bg-1 d-flex justify-center align-center">
<div class="bg-2 d-flex justify-center align-center">
<div class="bg-3 d-flex justify-center align-center">
<div class="bg-4 d-flex justify-center align-center">
<div class="div-logo">
<img src='assets/images/fullLogo.png' alt='logo'>
<div class="bg-1 d-flex justify-center align-center">
<div class="bg-2 d-flex justify-center align-center">
<div class="bg-3 d-flex justify-center align-center">
<div class="bg-4 d-flex justify-center align-center">
<div class="div-logo">
<img src='assets/images/fullLogo.png' alt='logo'>
</div>
</div>
</div>
</div>
</div>
</div>
<h3 class="center text-white">Inicie a sessão</h3>
<form class="form">
<p class="form-label text-white">Email</p>
<ion-item class="form-input">
<ion-input type="text" [(ngModel)]="username" name="input-username"></ion-input>
</ion-item>
<p class="form-label text-white">Palavra-passe</p>
<ion-item class="form-input">
<ion-input (keyup.enter)="Login()" type="password" [(ngModel)]="password" name="input-password" ></ion-input>
</ion-item>
<div class="d-flex pt-25">
<button class="btn-ok btn-login" fill="clear" expand="block" shape="round" (click)="Login()">Iniciar</button>
</div>
</form>
<div class="msg-bottom d-flex">
<p class="msg-bottom-p">Uma iniciativa do Gabinete do Presidente da República</p>
<h3 class="center text-white">Inicie a sessão</h3>
<form class="form">
<p class="form-label text-white">Nome de utilizador</p>
<ion-item class="form-input">
<ion-input type="text" [(ngModel)]="username" name="input-username"></ion-input>
</ion-item>
<p class="form-label text-white">Palavra-passe</p>
<ion-item class="form-input">
<ion-input (keyup.enter)="Login()" type="password" [(ngModel)]="password" name="input-password" ></ion-input>
</ion-item>
<div class="d-flex pt-25">
<button class="btn-ok btn-login" fill="clear" expand="block" shape="round" (click)="Login()">Iniciar</button>
</div>
</form>
<div class="msg-bottom d-flex">
<p class="msg-bottom-p">Uma iniciativa do Gabinete do Presidente da República</p>
</div>
</div>
</div>
<div class="main-content height-100" *ngIf="userLoginPreference == 'pin' || setPint">
<div class=" align-center justify-center">
<div class="div-top-header">
<div class="main-content height-100" *ngIf="userLoginPreference == 'pin' || setPint">
<div class=" align-center justify-center">
<div class="div-top-header">
<div class="div-logo">
<img src='assets/images/logo-bg.png' alt='logo'>
<div class="div-logo">
<img src='assets/images/logo-bg.png' alt='logo'>
</div>
</div>
</div>
<ion-title *ngIf="!setPint" class="title">Digite o PIN</ion-title>
<ion-title *ngIf="setPint" class="title">Digite o novo PIN</ion-title>
<ion-title *ngIf="!setPint" class="title">Digite o PIN</ion-title>
<ion-title *ngIf="setPint" class="title">Digite o novo PIN</ion-title>
<div class="d-flex pt-25 align-center justify-center">
<div class="dot" [class.dot-active]="code.length >= 1"></div>
<div class="dot" [class.dot-active]="code.length >= 2"></div>
<div class="dot" [class.dot-active]="code.length >= 3"></div>
<div class="dot"[class.dot-active]="code.length >= 4"></div>
</div>
<div class="terminal">
<div class="d-flex">
<div class="circle" (click)="setCode('1')">1</div> <div class="circle" (click)="setCode('2')">2</div> <div class="circle" (click)="setCode('3')">3</div>
<div class="d-flex pt-25 align-center justify-center">
<div class="dot" [class.dot-active]="code.length >= 1"></div>
<div class="dot" [class.dot-active]="code.length >= 2"></div>
<div class="dot" [class.dot-active]="code.length >= 3"></div>
<div class="dot"[class.dot-active]="code.length >= 4"></div>
</div>
<div class="d-flex">
<div class="circle" (click)="setCode('4')">4</div> <div class="circle" (click)="setCode('5')">5</div> <div class="circle" (click)="setCode('6')">6</div>
<div class="terminal">
<div class="d-flex">
<div class="circle" (click)="setCode('1')">1</div> <div class="circle" (click)="setCode('2')">2</div> <div class="circle" (click)="setCode('3')">3</div>
</div>
<div class="d-flex">
<div class="circle" (click)="setCode('4')">4</div> <div class="circle" (click)="setCode('5')">5</div> <div class="circle" (click)="setCode('6')">6</div>
</div>
<div class="d-flex">
<div class="circle" (click)="setCode('7')">7</div> <div class="circle" (click)="setCode('8')">8</div> <div class="circle" (click)="setCode('9')">9</div>
</div>
<div class="d-flex align-center justify-center">
<div class="circle" (click)="setCode('0')">0</div>
</div>
</div>
<div class="d-flex">
<div class="circle" (click)="setCode('7')">7</div> <div class="circle" (click)="setCode('8')">8</div> <div class="circle" (click)="setCode('9')">9</div>
<div *ngIf="!setPint" class="voltar d-flex align-center justify-center pt-25 clear" (click)="setPint=false; userLoginPreference='none'">
Entrar com senha
</div>
<div class="d-flex align-center justify-center">
<div class="circle" (click)="setCode('0')">0</div>
</div>
</div>
<div *ngIf="!setPint" class="voltar d-flex align-center justify-center pt-25 clear" (click)="setPint=false; userLoginPreference='none'">
Entrar com senha
</div>
<div *ngIf="setPint" class="voltar d-flex align-center justify-center pt-25 clear" (click)="pin=!pin;">
Limpar
</div>
<div *ngIf="setPint" class="voltar d-flex align-center justify-center pt-25 clear" (click)="pin=!pin;">
Limpar
</div>
</div>
</div>
</div>
</div>
+4 -3
View File
@@ -211,8 +211,9 @@ ion-item{
}
}
@media only screen and (min-width: 1024px){
.form{
width: 400px;
@media only screen and (max-height: 746px){
.msg-bottom-p {
padding-top: 20px;
position: unset !important;
}
}
@@ -14,20 +14,44 @@
<ion-content>
<div class="main-content">
<div class="ion-item-container">
<div class="ion-item-container" [className]="Form?.get('Subject')?.invalid && validateFrom ? 'input-error ion-item-container' : 'ion-item-container' ">
<ion-input type="text" placeholder="Assunto*" [(ngModel)]="postEvent.Subject"></ion-input>
</div>
<div *ngIf="Form && validateFrom" >
<div *ngIf="Form.get('Subject').invalid " class="input-errror-message">
<div *ngIf="Form.get('Subject').errors?.required">
Campo obrigatório.
</div>
<div *ngIf="Form.get('Subject').errors?.minlength">
O campo deve ter pelo menos 4 caracteres.
</div>
</div>
</div>
<div class="container-div">
<div class="ion-item-class-2 d-flex">
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-location.svg"></ion-icon>
</div>
<div class="ion-input-class flex-grow-1">
<div class="ion-input-class flex-grow-1 width-100" [className]="Form?.get('Subject')?.invalid && validateFrom ? 'input-error ion-input-class flex-grow-1 width-100' : 'ion-input-class flex-grow-1 width-100' " >
<ion-input type="text" placeholder="Localização*" [(ngModel)]="postEvent.Location"></ion-input>
</div>
</div>
</div>
<div *ngIf="Form && validateFrom" >
<div *ngIf="Form.get('Location').invalid " class="input-errror-message">
<div *ngIf="Form.get('Location').errors?.required">
Campo obrigatório.
</div>
<div *ngIf="Form.get('Location').errors?.minlength">
O campo deve ter pelo menos 4 caracteres.
</div>
</div>
</div>
<div class="container-div">
<div class="ion-item-class-2 d-flex">
@@ -36,7 +60,7 @@
</div>
<div class="ion-input-class flex-grow-1 d-flex justify-center align-center material-inputs materia-top ">
<mat-form-field class="width-100" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-form-field appearance="none" class="width-100" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="postEvent.CalendarName" >
<mat-option value="Oficial">
Oficial
@@ -58,9 +82,9 @@
</div>
<div class="ion-input-class flex-grow-1 d-flex justify-center align-center material-inputs materia-top">
<mat-form-field class="width-100" placeholder="Sample Type" required>
<mat-form-field appearance="none" class="width-100" placeholder="Sample Type" required>
<!-- <input matInput type="text" > -->
<mat-select matInput [(value)]="postEvent.Categories[0]" >
<mat-select [(value)]="postEvent.Categories[0]" >
<mat-option value="Reunião">
Reunião
</mat-option>
@@ -84,7 +108,11 @@
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
</div>
<div class="ion-input-class flex-grow-1">
<!--
[className]="Form?.get('Subject')?.invalid ? 'input-error ion-input-class flex-grow-1' : 'ion-input-class ion-input-class flex-grow-1' "
-->
<div class="ion-input-class flex-grow-1" >
<mat-form-field class="date-hour-picker">
<input matInput [ngxMatDatetimePicker]="picker1"
@@ -113,7 +141,10 @@
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
</div>
<div (click)="openFim()" class="ion-input-class flex-grow-1">
<!--
[className]="Form?.get('Subject')?.invalid ? 'input-error ion-input-class flex-grow-1' : 'ion-input-class ion-input-class flex-grow-1' "
-->
<div (click)="openFim()" class="ion-input-class flex-grow-1" >
<mat-form-field class="date-hour-picker">
<input matInput [ngxMatDatetimePicker]="fim"
@@ -144,7 +175,7 @@
</div>
<div class="ion-input-class flex-grow-1 d-flex justify-center align-center material-inputs materia-top">
<mat-form-field floatLabel="never" class="width-100" value="false" interface="action-sheet" required>
<mat-form-field appearance="none" floatLabel="never" class="width-100" value="false" interface="action-sheet" required>
<mat-select placeholder="Selecione repetição*" [(ngModel)]="postEvent.IsRecurring">
<mat-option value="false">
Não se repete
@@ -61,8 +61,8 @@ export class NewEventPage implements OnInit {
public showSeconds = false;
public touchUi = false;
public enableMeridian = false;
public minDate: any;
public maxDate: any;
public minDate = new Date();
public maxDate = '';
public stepHour = 1;
public stepMinute = 5;
public stepSecond = 5;
@@ -71,7 +71,7 @@ export class NewEventPage implements OnInit {
@Input() profile:string;
@Input() selectedSegment: string;
@Input() selectedDate: Date;
@Input() taskParticipants: EventPerson[];
@Input() taskParticipants: EventPerson[] = [];
@Input() taskParticipantsCc: any = [];
@Output() setIntervenient = new EventEmitter<any>();
@@ -94,6 +94,9 @@ export class NewEventPage implements OnInit {
@ViewChild('inicio') inicio: any;
@ViewChild('picker1') picker1: any;
Form: any = {}
validateFrom = false
public options = [
{ value: true, label: 'True' },
@@ -118,7 +121,6 @@ export class NewEventPage implements OnInit {
return this.dateControlEnd.value
}
constructor(
private modalController: ModalController,
private eventService: EventsService,
@@ -154,7 +156,7 @@ export class NewEventPage implements OnInit {
let selectedEndDate = new Date(this.selectedDate);
/* Set + 30minutes to seleted datetime */
selectedEndDate.setMinutes(this.selectedDate.getMinutes() + 30) ;
this.minDate = this.selectedDate.toString();
if(this.selectedSegment != "Combinada"){
this.postEvent ={
@@ -222,6 +224,46 @@ export class NewEventPage implements OnInit {
this.date = new Date(2021,9,4,5,6,7);
this.getDatepickerData()
this.injectValidation()
}
runValidation() {
this.validateFrom = true
}
injectValidation() {
this.Form = new FormGroup({
Subject: new FormControl(this.postEvent.Subject, [
Validators.required,
Validators.minLength(4)
]),
Location: new FormControl(this.postEvent.Location, [
Validators.required,
]),
CalendarName: new FormControl(this.postEvent.CalendarName),
Categories: new FormControl(this.postEvent.Categories[0], [
Validators.required
]),
dateStart: new FormControl(this.dateStart, [
Validators.required
]),
dateEnd: new FormControl(this.dateEnd, [
Validators.required
]),
IsRecurring: new FormControl(this.postEvent.IsRecurring, [
Validators.required
]),
participantes: new FormControl(this.participantes, [
Validators.required
]),
})
}
get participantes() {
return this.taskParticipantsCc.concat(this.taskParticipants)
}
openInicio() {
@@ -283,7 +325,12 @@ export class NewEventPage implements OnInit {
}
async save(){
async save() {
this.runValidation()
// dont runt this function
if (!this.Form.valid) return false
this.getDatepickerData()
@@ -16,7 +16,7 @@
<ion-item-sliding class="overflow-y-auto">
<div class="px-20">
<div class="ion-item-container width-100">
<ion-input placeholder="Assunto" [(ngModel)]="eventProcess.workflowInstanceDataFields.Subject"></ion-input>
<ion-input placeholder="Assunto*" [(ngModel)]="eventProcess.workflowInstanceDataFields.Subject"></ion-input>
</div>
<div class="container-div width-100">
<div class="ion-item-class-2">
@@ -24,7 +24,7 @@
<ion-icon slot="start" src="assets/images/icons-location.svg"></ion-icon>
</div>
<div class="ion-input-class">
<ion-input placeholder="Localização" [(ngModel)]="eventProcess.workflowInstanceDataFields.Location"></ion-input>
<ion-input placeholder="Localização*" [(ngModel)]="eventProcess.workflowInstanceDataFields.Location"></ion-input>
</div>
</div>
<!-- Error messages -->
@@ -41,7 +41,7 @@
</div>
<div class="ion-input-class">
<ion-select disabled placeholder="Selecione agenda"
<ion-select disabled placeholder="Selecione agenda*"
class="d-block d-md-none"
selectedText="{{eventProcess.workflowInstanceDataFields.Agenda}}"
[(ngModel)]="eventProcess.workflowInstanceDataFields.Agenda"
@@ -53,8 +53,8 @@
</ion-select>
<mat-form-field class="d-none d-md-block width-100" placeholder="Selecione agenda">
<mat-select [(value)]="eventProcess.workflowInstanceDataFields.Agenda" >
<mat-form-field class="d-none d-md-block width-100" >
<mat-select placeholder="Selecione agenda" [(ngModel)]="eventProcess.workflowInstanceDataFields.Agenda" >
<mat-option value="Oficial">
Oficial
</mat-option>
@@ -194,7 +194,7 @@
<div class="list-people flex-grow-1">
<ion-item lines="none">
<ion-list>
<ion-label *ngIf="taskParticipants?.length < 1" class="list-people-title">Adicionar intervenientes</ion-label>
<ion-label *ngIf="taskParticipants?.length < 1" class="list-people-title">Adicionar intervenientes*</ion-label>
<ion-label *ngFor="let participant of taskParticipants">{{participant.Name}}</ion-label>
</ion-list>
</ion-item>
@@ -18,7 +18,7 @@
</ion-refresher-content>
</ion-refresher>
<div class="width-100 overflow-y-auto height-100" *ngIf="taskslist.length >= 1">
<div class="width-100 overflow-y-auto height-100" *ngIf="taskslist">
<ion-list>
<ion-item
class="expediente ion-no-padding cursor-pointer"
@@ -29,7 +29,7 @@
</ion-refresher>
<div class="width-100" [ngSwitch]="segment">
<div *ngIf="parecerList.length >= 1" class="overflow-y-auto height-100">
<div *ngIf="parecerList" class="overflow-y-auto height-100">
<ion-list *ngSwitchCase="'parecer'">
<!-- *ngFor = "let task of parecerList; let i = index"
(click)="viewExpedientDetail(task.SerialNumber)" -->
@@ -64,7 +64,7 @@
</ion-list>
</div>
<div *ngIf="deferimentoList.length >= 1" class="overflow-y-auto height-100">
<div *ngIf="deferimentoList" class="overflow-y-auto height-100">
<ion-list *ngSwitchCase="'deferimento'">
<ion-item
class="expediente ion-no-padding cursor-pointer"
+1 -1
View File
@@ -2,7 +2,7 @@ export const environment = {
production: true,
apiURL: 'https://equilibrium.dyndns.info/GabineteDigital.Services/V4/api/',
apiChatUrl: 'https://www.tabularium.pt/api/v1/',
domain: '', //gabinetedigital.local
domain: 'gabinetedigital.local',
defaultuser: '',
defaultuserpwd: ''
};
+3 -3
View File
@@ -8,9 +8,9 @@ export const environment = {
/* apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V4/api/', */
apiChatUrl: 'https://www.tabularium.pt/api/v1/',
/* apiChatUrl: 'http://chat.gabinetedigital.local:3000/api/v1/', */
domain: '', //gabinetedigital.local
defaultuser: '',//paulo.pinto paulo.pinto@gabinetedigital.local
defaultuserpwd: '' //tabteste@006
domain: 'gabinetedigital.local', //gabinetedigital.local
defaultuser: 'paulo.pinto@gabinetedigital.local',//paulo.pinto paulo.pinto@gabinetedigital.local
defaultuserpwd: 'tabteste@006' //tabteste@006
};
/*
+15 -3
View File
@@ -950,14 +950,14 @@ background: rgb(92, 92, 92);
}
.mat-form-field-underline.ng-tns-c193-6.ng-star-inserted, .mat-form-field-underline {
display: none;
// display: none;
}
.date-hour-picker {
margin-top: -6px;
label#mat-form-field-label-7 {
// display: none;
display: none;
}
.span.ng-tns-c193-4, .ng-star-inserted {
@@ -983,4 +983,16 @@ background: rgb(92, 92, 92);
// .ng-star-inserted {
// opacity: 0;
// }
// }
.input-error{
border: 1px solid #fba0a0 !important;
}
.input-errror-message{
margin-top: -16px;
margin-bottom: 10px;
font-size: 11pt;
}