mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +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>
|
||||
</div>
|
||||
<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-select placeholder="Selecione repetição*"
|
||||
[(ngModel)]="EventRecurrenceType"
|
||||
(ngModelChange)="onSelectedRecurringChanged($event)">
|
||||
>
|
||||
<mat-option
|
||||
*ngFor="let recurring of recurringTypes" value="{{recurring.Code}}"
|
||||
>
|
||||
@@ -216,7 +216,7 @@
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -237,9 +237,9 @@
|
||||
>
|
||||
</ion-datetime> -->
|
||||
<!-- <ion-input placeholder="Data fim" [(ngModel)]="postData.EndDate"></ion-input> -->
|
||||
|
||||
|
||||
<!-- [formControl]="dateControlOccurrence" -->
|
||||
|
||||
|
||||
<mat-form-field class="date-hour-picker">
|
||||
<input matInput [ngxMatDatetimePicker]="occurrrence"
|
||||
placeholder="Choose a date"
|
||||
@@ -256,7 +256,7 @@
|
||||
>
|
||||
</ngx-mat-datetime-picker>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+6
-6
@@ -62,13 +62,13 @@
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
|
||||
<div *ngIf="eventsList">
|
||||
<h5 class="h3-event-title">Eventos Associados</h5>
|
||||
<ion-list>
|
||||
<div class="content-items width-100" *ngIf="eventsList">
|
||||
<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"
|
||||
(click)="goToEvent(event.EventId)"
|
||||
>
|
||||
@@ -83,7 +83,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</ion-item>
|
||||
|
||||
|
||||
</ion-list>
|
||||
</div>
|
||||
</ion-list>
|
||||
@@ -94,15 +94,15 @@
|
||||
<div *ngIf="task" class="aside-right flex-column height-100">
|
||||
<div class="buttons">
|
||||
<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>
|
||||
<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>
|
||||
<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('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)="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>
|
||||
<div class="solid"></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 { ToastService } from 'src/app/services/toast.service';
|
||||
import { Location } from '@angular/common';
|
||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
import { SearchDocument } from 'src/app/models/search-document';
|
||||
|
||||
@Component({
|
||||
selector: 'app-expediente-detail',
|
||||
@@ -36,13 +38,15 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
profile: string;
|
||||
intervenientes: any;
|
||||
cc: any = [];
|
||||
documents:SearchDocument[] = [];
|
||||
attachments:any;
|
||||
|
||||
hideSendToPendentes = true
|
||||
|
||||
constructor(
|
||||
private processes: ProcessesService,
|
||||
private iab: InAppBrowser,
|
||||
private attachments: AttachmentsService,
|
||||
//private attachments: AttachmentsService,
|
||||
private events: EventsService,
|
||||
private router: Router,
|
||||
private modalController: ModalController,
|
||||
@@ -50,6 +54,7 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private toastService: ToastService,
|
||||
private location: Location,
|
||||
private attachmentsService: AttachmentsService,
|
||||
) {
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
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) {
|
||||
let classs;
|
||||
if( window.innerWidth <= 800){
|
||||
|
||||
@@ -409,17 +409,24 @@ export class ExpedientePrPage implements OnInit {
|
||||
cssClass: classs,
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(res=>{
|
||||
console.log(res['data']);
|
||||
modal.onDidDismiss().then(async(res)=>{
|
||||
let body = res['data'];
|
||||
// alert('close '+ res['data'])
|
||||
if(res['data']){
|
||||
console.log('open discart');
|
||||
if(res['data']) {
|
||||
|
||||
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{
|
||||
console.log('Not open');
|
||||
this.close();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user