mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
+3
-3
@@ -128,12 +128,12 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div">
|
||||
<div class="container-div" >
|
||||
<div class="ion-item-class-2">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-person.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class-no-height">
|
||||
<div class="ion-input-class-no-height" [class.input-error]="Form?.get('participantes')?.invalid && validateFrom ">
|
||||
<div class="list-people">
|
||||
<ion-item lines="none">
|
||||
<ion-list>
|
||||
@@ -154,7 +154,7 @@
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-people-cc.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class-no-height">
|
||||
<div class="ion-input-class-no-height" >
|
||||
<div class="list-people">
|
||||
<ion-item lines="none">
|
||||
<ion-list>
|
||||
|
||||
+19
-3
@@ -206,9 +206,9 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
// IsRecurring: new FormControl(this.postEvent.IsRecurring, [
|
||||
// Validators.required
|
||||
// ]),
|
||||
// participantes: new FormControl(this.taskParticipantsCc.concat(this.taskParticipants), [
|
||||
// Validators.required
|
||||
// ]),
|
||||
participantes: new FormControl(this.taskParticipantsCc, [
|
||||
Validators.required
|
||||
]),
|
||||
|
||||
})
|
||||
}
|
||||
@@ -236,6 +236,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
else if(this.postData.Priority=='99999864') {
|
||||
this.dispatchFolder.DeadlineType = 'Urgentíssimo';
|
||||
}
|
||||
|
||||
let attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||
attendees = attendees.map(function(val) {
|
||||
return {
|
||||
@@ -261,6 +262,8 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
this.selectedTypes = this.toppingsValues
|
||||
}
|
||||
|
||||
let loader = this.toastService.loading()
|
||||
|
||||
this.dispatchFolder.SubjectTypes = this.selectedTypes;
|
||||
|
||||
switch (this.loggeduser.Profile) {
|
||||
@@ -289,10 +292,13 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
console.log(this.postData);
|
||||
|
||||
this.taskResult = await this.processes.postDespatcho(this.postData).toPromise();
|
||||
|
||||
loader.remove()
|
||||
await this.toastService.successMessage('Processo efetuado');
|
||||
this.modalController.dismiss();
|
||||
|
||||
} catch (error) {
|
||||
loader.remove()
|
||||
await this.toastService.badRequest('Processo não efetuado')
|
||||
}
|
||||
console.log('this.taskResult', this.taskResult);
|
||||
@@ -319,10 +325,12 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
}
|
||||
}
|
||||
this.taskResult = await this.processes.postParecer(this.postData).toPromise();
|
||||
loader.remove()
|
||||
await this.toastService.successMessage('Pedido enviado');
|
||||
this.modalController.dismiss(action_parecer);
|
||||
|
||||
} catch (error) {
|
||||
loader.remove()
|
||||
await this.toastService.badRequest('Processo não efetuado')
|
||||
}
|
||||
break;
|
||||
@@ -347,9 +355,12 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
}
|
||||
}
|
||||
this.taskResult = await this.processes.postDeferimento(this.postData).toPromise();
|
||||
|
||||
loader.remove()
|
||||
await this.toastService.successMessage('Processo efetuado');
|
||||
this.modalController.dismiss(action_deferimento);
|
||||
} catch (error) {
|
||||
loader.remove()
|
||||
await this.toastService.badRequest('Processo não efetuado')
|
||||
}
|
||||
console.log('this.taskResult', this.taskResult);
|
||||
@@ -382,12 +393,15 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
"Note": "",
|
||||
}
|
||||
}
|
||||
|
||||
loader.remove()
|
||||
this.taskResult = await this.processes.postDespatchoPr(this.postData).toPromise();
|
||||
|
||||
await this.toastService.successMessage('Processo efetuado');
|
||||
this.modalController.dismiss(action_despacho_pr);
|
||||
|
||||
} catch (error) {
|
||||
loader.remove()
|
||||
await this.toastService.badRequest('Processo não efetuado')
|
||||
}
|
||||
console.log('this.taskResult', this.taskResult);
|
||||
@@ -413,12 +427,14 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
"Note": "",
|
||||
}
|
||||
}
|
||||
loader.remove()
|
||||
this.taskResult = await this.processes.postParecerPr(this.postData).toPromise();
|
||||
|
||||
await this.toastService.badRequest('Processo não efetuado');
|
||||
this.modalController.dismiss(action_parecer_pr);
|
||||
|
||||
} catch (error) {
|
||||
loader.remove()
|
||||
await this.toastService.badRequest('Processo não efetuado')
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
<ion-item
|
||||
class="expediente ion-no-padding"
|
||||
*ngFor = "let task of deferimentoList"
|
||||
(click)="viewPedidoDetail(task.SerialNumber)"
|
||||
(click)="goToPedido(task.SerialNumber)"
|
||||
>
|
||||
<!-- (click)="viewExpedientDetail(task.SerialNumber)" -->
|
||||
<!-- [routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]" -->
|
||||
|
||||
@@ -165,18 +165,6 @@ export class PedidosPage implements OnInit {
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
async viewPedidoDetail(serialNumber:any) {
|
||||
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
enterAnimation: "",
|
||||
serialNumber: serialNumber,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos/pedido'], navigationExtras);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { EditActionPage } from './edit-action.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: EditActionPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class EditActionPageRoutingModule {}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { EditActionPageRoutingModule } from './edit-action-routing.module';
|
||||
|
||||
import { EditActionPage } from './edit-action.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
EditActionPageRoutingModule
|
||||
],
|
||||
declarations: [EditActionPage]
|
||||
})
|
||||
export class EditActionPageModule {}
|
||||
@@ -0,0 +1,9 @@
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-title>edit-action</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
|
||||
</ion-content>
|
||||
@@ -0,0 +1,24 @@
|
||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { EditActionPage } from './edit-action.page';
|
||||
|
||||
describe('EditActionPage', () => {
|
||||
let component: EditActionPage;
|
||||
let fixture: ComponentFixture<EditActionPage>;
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ EditActionPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(EditActionPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-edit-action',
|
||||
templateUrl: './edit-action.page.html',
|
||||
styleUrls: ['./edit-action.page.scss'],
|
||||
})
|
||||
export class EditActionPage implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -123,11 +123,18 @@ export class NewActionPage implements OnInit {
|
||||
ActionType: this.segment,
|
||||
}
|
||||
|
||||
|
||||
let loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.publication.CreatePublicationFolder(this.folder).toPromise();
|
||||
|
||||
loader.remove()
|
||||
this.toastService.successMessage("Ação presidencial criado");
|
||||
this.close();
|
||||
} catch (error) {
|
||||
|
||||
loader.remove()
|
||||
this.toastService.badRequest("Ação presidencial não criado");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,42 +1,46 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { PublicationsPage } from './publications.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: PublicationsPage
|
||||
},
|
||||
{
|
||||
path: 'new-publication',
|
||||
loadChildren: () => import('./new-publication/new-publication.module').then( m => m.NewPublicationPageModule)
|
||||
},
|
||||
{
|
||||
path: 'gallery',
|
||||
loadChildren: () => import('./gallery/gallery.module').then( m => m.GalleryPageModule)
|
||||
},
|
||||
{
|
||||
path: 'new-action',
|
||||
loadChildren: () => import('./new-action/new-action.module').then( m => m.NewActionPageModule)
|
||||
},
|
||||
{
|
||||
path: 'view-publications',
|
||||
children: [
|
||||
{
|
||||
path:'',
|
||||
loadChildren: ()=> import('./view-publications/view-publications.module').then(m => m.ViewPublicationsPageModule)
|
||||
},
|
||||
{
|
||||
path:'publication-detail',
|
||||
loadChildren: ()=> import('./view-publications/publication-detail/publication-detail.module').then(m => m.PublicationDetailPageModule)
|
||||
},
|
||||
]
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { PublicationsPage } from './publications.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: PublicationsPage
|
||||
},
|
||||
{
|
||||
path: 'new-publication',
|
||||
loadChildren: () => import('./new-publication/new-publication.module').then( m => m.NewPublicationPageModule)
|
||||
},
|
||||
{
|
||||
path: 'gallery',
|
||||
loadChildren: () => import('./gallery/gallery.module').then( m => m.GalleryPageModule)
|
||||
},
|
||||
{
|
||||
path: 'new-action',
|
||||
loadChildren: () => import('./new-action/new-action.module').then( m => m.NewActionPageModule)
|
||||
},
|
||||
{
|
||||
path: 'view-publications',
|
||||
children: [
|
||||
{
|
||||
path:'',
|
||||
loadChildren: ()=> import('./view-publications/view-publications.module').then(m => m.ViewPublicationsPageModule)
|
||||
},
|
||||
{
|
||||
path:'publication-detail',
|
||||
loadChildren: ()=> import('./view-publications/publication-detail/publication-detail.module').then(m => m.PublicationDetailPageModule)
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'edit-action',
|
||||
loadChildren: () => import('./edit-action/edit-action.module').then( m => m.EditActionPageModule)
|
||||
];
|
||||
}
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class PublicationsPageRoutingModule {}
|
||||
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
|
||||
@@ -34,7 +34,37 @@
|
||||
<!-- Content -->
|
||||
|
||||
<div class="aside overflow-y-auto d-flex flex-wrap width-100">
|
||||
<div class="item width-100 d-flex"
|
||||
<!-- <ion-list class="width-100"> -->
|
||||
<ion-item-sliding class="width-100"
|
||||
*ngFor="let viagem of publicationsTravelFolderList">
|
||||
<ion-item class="item width-100 d-flex ion-no-border ion-no-margin ion-no-padding">
|
||||
<div (click)="goToPublicationsList(viagem.ProcessId)" class="item-icon cursor-pointer">
|
||||
<ion-icon slot="end" src='assets/images/icons-plane-active.svg'></ion-icon>
|
||||
</div>
|
||||
<div (click)="goToPublicationsList(viagem.ProcessId)" class="item-content flex-grow-1 cursor-pointer">
|
||||
<p class="item-content-date my-5">De {{viagem.DateBegin}} a {{viagem.DateEnd}}</p>
|
||||
<p class="item-content-title my-10">{{viagem.Description}}</p>
|
||||
<p class="item-content-detail my-5">{{viagem.Detail}}</p>
|
||||
</div>
|
||||
<div (click)="openOptions(viagem.ProcessId)" class="item-options d-none cursor-pointer" autoHide="false">
|
||||
<ion-icon src="assets/images/icons-menu.svg"></ion-icon>
|
||||
</div>
|
||||
</ion-item>
|
||||
<ion-item-options class="members-options" side="end">
|
||||
<!-- <ion-item-option (click)="editAction(viagem.ProcessId)">
|
||||
<button class="btn-no-color">
|
||||
<ion-icon class="edit" slot="end" src="assets/images/icons-edit.svg" ></ion-icon>
|
||||
</button>
|
||||
</ion-item-option> -->
|
||||
<ion-item-option (click)="deleteAction(viagem.ProcessId)">
|
||||
<button class="btn-no-color">
|
||||
<ion-icon class="delete" name="trash-sharp"></ion-icon>
|
||||
</button>
|
||||
</ion-item-option>
|
||||
</ion-item-options>
|
||||
</ion-item-sliding>
|
||||
<!-- </ion-list> -->
|
||||
<!-- <div class="item width-100 d-flex"
|
||||
*ngFor="let viagem of publicationsTravelFolderList">
|
||||
<div (click)="goToPublicationsList(viagem.ProcessId)" class="item-icon cursor-pointer">
|
||||
<ion-icon slot="end" src='assets/images/icons-plane-active.svg'></ion-icon>
|
||||
@@ -47,8 +77,29 @@
|
||||
<div (click)="openOptions(viagem.ProcessId)" class="item-options d-none cursor-pointer" autoHide="false">
|
||||
<ion-icon src="assets/images/icons-menu.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item width-100 d-flex"
|
||||
</div> -->
|
||||
<ion-item-sliding class="item width-100"
|
||||
*ngFor="let evento of publicationsEventFolderList">
|
||||
<ion-item class="item width-100 d-flex ion-no-border ion-no-margin ion-no-padding"
|
||||
(click)="viewPublications(evento)">
|
||||
<div class="item-icon2">
|
||||
<ion-icon slot="end" src='assets/images/icons-nav-actions.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="item-content flex-grow-1">
|
||||
<ion-label>
|
||||
<p class="item-content-date">{{evento.DateBegin}}</p>
|
||||
<p class="item-content-title">{{evento.Description}}</p>
|
||||
</ion-label>
|
||||
</div>
|
||||
<div (click)="openOptions(evento.ProcessId)" class="item-options d-none cursor-pointer" autoHide="false">
|
||||
<ion-icon src="assets/images/icons-menu.svg"></ion-icon>
|
||||
</div>
|
||||
</ion-item>
|
||||
<ion-item-options class="members-options" side="end">
|
||||
<ion-item-option color="danger"><ion-icon name="delete"></ion-icon> Apagar</ion-item-option>
|
||||
</ion-item-options>
|
||||
</ion-item-sliding>
|
||||
<!-- <div class="item width-100 d-flex"
|
||||
*ngFor="let evento of publicationsEventFolderList"
|
||||
(click)="viewPublications(evento)">
|
||||
<div class="item-icon2">
|
||||
@@ -63,7 +114,7 @@
|
||||
<div (click)="openOptions(evento.ProcessId)" class="item-options d-none cursor-pointer" autoHide="false">
|
||||
<ion-icon src="assets/images/icons-menu.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -162,6 +162,22 @@ ion-toolbar{
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
ion-item-option{
|
||||
display: flex;
|
||||
background: #ffe0e0;
|
||||
align-items: center;
|
||||
align-content: center;
|
||||
}
|
||||
|
||||
.delete{
|
||||
padding: 7px;
|
||||
font-size: 21px;
|
||||
color:#d30a0a;
|
||||
border-radius: 20px;
|
||||
margin: 10px;
|
||||
border: 1px solid #d30a0a;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import { LoadingController } from '@ionic/angular';
|
||||
import { LoadingService } from 'src/app/services/loading.service';
|
||||
import { Publication } from 'src/app/models/publication';
|
||||
import { ActionsOptionsPage } from 'src/app/shared/popover/actions-options/actions-options.page';
|
||||
import { EditActionPage } from './edit-action/edit-action.page';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -89,6 +90,12 @@ export class PublicationsPage implements OnInit {
|
||||
this.hideRefreshBtn = false;
|
||||
}
|
||||
}
|
||||
|
||||
refreshing() {
|
||||
setTimeout(() => {
|
||||
this.getActions();
|
||||
}, 1500);
|
||||
}
|
||||
|
||||
doRefresh(event) {
|
||||
this.getActions();
|
||||
@@ -131,6 +138,27 @@ export class PublicationsPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
async editAction(id?: string){
|
||||
const modal = await this.modalController.create({
|
||||
component: EditActionPage,
|
||||
componentProps:{
|
||||
item: id,
|
||||
},
|
||||
cssClass: 'new-action modal modal-desktop',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(()=>{
|
||||
this.getActions();
|
||||
});
|
||||
//this.refreshing()
|
||||
}
|
||||
|
||||
deleteAction(id?: string){
|
||||
this.publications.DeletePresidentialAction(id).toPromise();
|
||||
this.refreshing()
|
||||
}
|
||||
|
||||
async AddPublicationFolder(item?:any) {
|
||||
|
||||
this.closeDesktopComponent();
|
||||
|
||||
@@ -125,4 +125,25 @@ export class ToastService {
|
||||
|
||||
}
|
||||
|
||||
|
||||
loading() : HTMLDivElement {
|
||||
let loader: HTMLDivElement = document.createElement('div')
|
||||
loader.innerHTML = `
|
||||
|
||||
<div class="loading-blocker">
|
||||
<div class="loading-blocker-container">
|
||||
<img src="/assets/images/Blocks-loader.gif" width="250" />
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
|
||||
document.body.append(loader)
|
||||
|
||||
loader.addEventListener('click', ()=>{
|
||||
// loader.remove()
|
||||
})
|
||||
return loader
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -342,9 +342,13 @@ export class NewEventPage implements OnInit {
|
||||
console.log(this.postEvent);
|
||||
|
||||
|
||||
let loader = this.toastService.loading()
|
||||
|
||||
this.eventService.postEventMd(this.postEvent, this.postEvent.CalendarName).subscribe(
|
||||
async (id) => {
|
||||
|
||||
loader.remove()
|
||||
|
||||
this.showLoader = false
|
||||
|
||||
const eventId: any = id;
|
||||
@@ -382,6 +386,8 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
},
|
||||
error => {
|
||||
|
||||
loader.remove()
|
||||
this.showLoader = false
|
||||
this.toastService.badRequest('Evento não criado')
|
||||
});
|
||||
|
||||
@@ -70,7 +70,7 @@ export class NewActionPage implements OnInit {
|
||||
}
|
||||
|
||||
get dateValid() {
|
||||
if (window.innerWidth <= 800) {
|
||||
if (window.innerWidth >= 800) {
|
||||
return this.folder.DateBegin < this.folder.DateEnd? ['ok']: []
|
||||
} else {
|
||||
return ['ok']
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
@@ -1036,4 +1036,19 @@ ngx-mat-datetime-content{
|
||||
|
||||
.mat-form-field-infix, .mat-form-field-wrapper {
|
||||
padding: 0px !important;
|
||||
}
|
||||
|
||||
|
||||
.loading-blocker {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #0000006b;
|
||||
|
||||
.loading-blocker-container {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user