mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 05:45:50 +00:00
Merge branch 'developer' of bitbucket.org:equilibriumito/gabinete-digital into developer
This commit is contained in:
+6
-6
@@ -204,11 +204,11 @@
|
|||||||
<ion-icon slot="start" src="assets/images/icons-refresh.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-refresh.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class flex-grow-1" [class.input-error]="Form?.get('dateOccurrence')?.invalid && validateFrom ">
|
<div class="ion-input-class flex-grow-1" [class.input-error]="Form?.get('dateOccurrence')?.invalid && validateFrom ">
|
||||||
|
|
||||||
<mat-form-field appearance="none" 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*"
|
<mat-select placeholder="Selecione repetição*"
|
||||||
[(ngModel)]="EventRecurrenceType"
|
[(ngModel)]="EventRecurrenceType"
|
||||||
(ngModelChange)="onSelectedRecurringChanged($event)">
|
>
|
||||||
<mat-option
|
<mat-option
|
||||||
*ngFor="let recurring of recurringTypes" value="{{recurring.Code}}"
|
*ngFor="let recurring of recurringTypes" value="{{recurring.Code}}"
|
||||||
>
|
>
|
||||||
@@ -216,7 +216,7 @@
|
|||||||
</mat-option>
|
</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -237,9 +237,9 @@
|
|||||||
>
|
>
|
||||||
</ion-datetime> -->
|
</ion-datetime> -->
|
||||||
<!-- <ion-input placeholder="Data fim" [(ngModel)]="postData.EndDate"></ion-input> -->
|
<!-- <ion-input placeholder="Data fim" [(ngModel)]="postData.EndDate"></ion-input> -->
|
||||||
|
|
||||||
<!-- [formControl]="dateControlOccurrence" -->
|
<!-- [formControl]="dateControlOccurrence" -->
|
||||||
|
|
||||||
<mat-form-field class="date-hour-picker">
|
<mat-form-field class="date-hour-picker">
|
||||||
<input matInput [ngxMatDatetimePicker]="occurrrence"
|
<input matInput [ngxMatDatetimePicker]="occurrrence"
|
||||||
placeholder="Choose a date"
|
placeholder="Choose a date"
|
||||||
@@ -256,7 +256,7 @@
|
|||||||
>
|
>
|
||||||
</ngx-mat-datetime-picker>
|
</ngx-mat-datetime-picker>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+6
-6
@@ -62,13 +62,13 @@
|
|||||||
</ion-item>
|
</ion-item>
|
||||||
</ion-list>
|
</ion-list>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="eventsList">
|
<div *ngIf="eventsList">
|
||||||
<h5 class="h3-event-title">Eventos Associados</h5>
|
<h5 class="h3-event-title">Eventos Associados</h5>
|
||||||
<ion-list>
|
<ion-list>
|
||||||
<div class="content-items width-100" *ngIf="eventsList">
|
<div class="content-items width-100" *ngIf="eventsList">
|
||||||
<ion-list>
|
<ion-list>
|
||||||
<ion-item class=" ion-no-padding width-100 cursor-pointer"
|
<ion-item class=" ion-no-padding width-100 cursor-pointer"
|
||||||
lines="none" *ngFor="let event of eventsList"
|
lines="none" *ngFor="let event of eventsList"
|
||||||
(click)="goToEvent(event.EventId)"
|
(click)="goToEvent(event.EventId)"
|
||||||
>
|
>
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
|
||||||
</ion-list>
|
</ion-list>
|
||||||
</div>
|
</div>
|
||||||
</ion-list>
|
</ion-list>
|
||||||
@@ -94,15 +94,15 @@
|
|||||||
<div *ngIf="task" class="aside-right flex-column height-100">
|
<div *ngIf="task" class="aside-right flex-column height-100">
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<div class="option-desc"> <div>Enviar para o PR</div> </div>
|
<div class="option-desc"> <div>Enviar para o PR</div> </div>
|
||||||
<button (click)="openAddNoteModal('Aprovar')" class="btn-cancel" shape="round" >Avaliação Superior</button>
|
<!-- <button (click)="openAddNoteModal('Aprovar')" class="btn-cancel" shape="round" >Avaliação Superior</button> -->
|
||||||
<div class="option-desc"> <div>Solicitar revisão</div> </div>
|
<div class="option-desc"> <div>Solicitar revisão</div> </div>
|
||||||
<button (click)="openAddNoteModal('Revisão')" class="btn-cancel" shape="round" >Mandar para Revisão</button>
|
<!-- <button (click)="openAddNoteModal('Revisão')" class="btn-cancel" shape="round" >Mandar para Revisão</button> -->
|
||||||
<div class="option-desc"> <div>Outras opções</div> </div>
|
<div class="option-desc"> <div>Outras opções</div> </div>
|
||||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efectuar Despacho</button>
|
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-ok" shape="round" >Efectuar Despacho</button>
|
||||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||||
<button (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
|
<button (click)="openExpedientActionsModal('2',fulltask)" class="btn-cancel" shape="round" >Pedido de Deferimento</button>
|
||||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||||
<button (click)="attachDocument()" class="btn-cancel" shape="round" >Anexar Documentos</button>
|
<!-- <button (click)="attachDocument()" class="btn-cancel" shape="round" >Anexar Documentos</button> -->
|
||||||
<button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Descartar</button>
|
<button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Descartar</button>
|
||||||
<div class="solid"></div>
|
<div class="solid"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+53
-1
@@ -14,6 +14,8 @@ import { DiscartExpedientModalPage } from '../../discart-expedient-modal/discart
|
|||||||
import { OptsExpedientePage } from 'src/app/shared/popover/opts-expediente/opts-expediente.page';
|
import { OptsExpedientePage } from 'src/app/shared/popover/opts-expediente/opts-expediente.page';
|
||||||
import { ToastService } from 'src/app/services/toast.service';
|
import { ToastService } from 'src/app/services/toast.service';
|
||||||
import { Location } from '@angular/common';
|
import { Location } from '@angular/common';
|
||||||
|
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||||
|
import { SearchDocument } from 'src/app/models/search-document';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-expediente-detail',
|
selector: 'app-expediente-detail',
|
||||||
@@ -36,13 +38,15 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
profile: string;
|
profile: string;
|
||||||
intervenientes: any;
|
intervenientes: any;
|
||||||
cc: any = [];
|
cc: any = [];
|
||||||
|
documents:SearchDocument[] = [];
|
||||||
|
attachments:any;
|
||||||
|
|
||||||
hideSendToPendentes = true
|
hideSendToPendentes = true
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private processes: ProcessesService,
|
private processes: ProcessesService,
|
||||||
private iab: InAppBrowser,
|
private iab: InAppBrowser,
|
||||||
private attachments: AttachmentsService,
|
//private attachments: AttachmentsService,
|
||||||
private events: EventsService,
|
private events: EventsService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
@@ -50,6 +54,7 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
private activatedRoute: ActivatedRoute,
|
private activatedRoute: ActivatedRoute,
|
||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
private location: Location,
|
private location: Location,
|
||||||
|
private attachmentsService: AttachmentsService,
|
||||||
) {
|
) {
|
||||||
this.activatedRoute.paramMap.subscribe(params => {
|
this.activatedRoute.paramMap.subscribe(params => {
|
||||||
if(params["params"].SerialNumber) {
|
if(params["params"].SerialNumber) {
|
||||||
@@ -207,6 +212,53 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getAttachments(serialNumber){
|
||||||
|
console.log(serialNumber);
|
||||||
|
|
||||||
|
this.attachmentsService.getAttachmentsBySerial(serialNumber).subscribe(res=>{
|
||||||
|
this.attachments = res;
|
||||||
|
console.log('res', res);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
attachDocument(){
|
||||||
|
this.getDoc();
|
||||||
|
}
|
||||||
|
|
||||||
|
async getDoc() {
|
||||||
|
const modal = await this.modalController.create({
|
||||||
|
component: SearchPage,
|
||||||
|
cssClass: 'modal-width-100-width-background modal',
|
||||||
|
componentProps: {
|
||||||
|
type: 'AccoesPresidenciais & ArquivoDespachoElect',
|
||||||
|
showSearchInput: true,
|
||||||
|
select: true
|
||||||
|
}
|
||||||
|
});
|
||||||
|
await modal.present();
|
||||||
|
modal.onDidDismiss().then((res)=>{
|
||||||
|
if(res){
|
||||||
|
const data = res.data;
|
||||||
|
this.documents.push(data.selected);
|
||||||
|
console.log( this.documents);
|
||||||
|
this.documents.forEach(element =>{
|
||||||
|
let body = {
|
||||||
|
"Source": "1",
|
||||||
|
"SourceId": element.Id,
|
||||||
|
"SourceTitle": element.Assunto,
|
||||||
|
"SerialNumber": this.task.SerialNumber,
|
||||||
|
"ApplicationId": element.ApplicationType
|
||||||
|
}
|
||||||
|
this.attachmentsService.setEventAttachmentById(body).subscribe((res)=>{
|
||||||
|
this.getAttachments(this.task.SerialNumber);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
async openExpedientActionsModal(taskAction: any, task: any) {
|
async openExpedientActionsModal(taskAction: any, task: any) {
|
||||||
let classs;
|
let classs;
|
||||||
if( window.innerWidth <= 800){
|
if( window.innerWidth <= 800){
|
||||||
|
|||||||
@@ -409,17 +409,24 @@ export class ExpedientePrPage implements OnInit {
|
|||||||
cssClass: classs,
|
cssClass: classs,
|
||||||
});
|
});
|
||||||
await modal.present();
|
await modal.present();
|
||||||
modal.onDidDismiss().then(res=>{
|
modal.onDidDismiss().then(async(res)=>{
|
||||||
console.log(res['data']);
|
|
||||||
let body = res['data'];
|
let body = res['data'];
|
||||||
// alert('close '+ res['data'])
|
if(res['data']) {
|
||||||
if(res['data']){
|
|
||||||
console.log('open discart');
|
|
||||||
|
|
||||||
this.distartExpedientModal(body);
|
//await this.distartExpedientModal(body);
|
||||||
|
const loader = this.toastService.loading()
|
||||||
|
try {
|
||||||
|
await this.processes.CompleteTask(body).toPromise();
|
||||||
|
this.toastService.successMessage('Processo descartado');
|
||||||
|
this.goBack();
|
||||||
|
} catch (error) {
|
||||||
|
this.toastService.badRequest('Processo não descartado')
|
||||||
|
} finally {
|
||||||
|
loader.remove()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
console.log('Not open');
|
this.close();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user