mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
fix actions and draft data object
This commit is contained in:
@@ -62,7 +62,7 @@ export class AddNotePage implements OnInit {
|
||||
this.documents.push(data.selected);
|
||||
}
|
||||
}, (error) => {
|
||||
console.log(error)
|
||||
// console.log(error)
|
||||
});
|
||||
|
||||
await modal.present();
|
||||
|
||||
@@ -108,7 +108,7 @@ export class CreateProcessPage implements OnInit {
|
||||
this.fulltask = this.navParams.get('fulltask');
|
||||
|
||||
|
||||
console.log('this.fulltask', this.fulltask)
|
||||
// console.log('this.fulltask', this.fulltask)
|
||||
|
||||
|
||||
// if(this.fulltask?.Documents) {
|
||||
@@ -121,7 +121,7 @@ export class CreateProcessPage implements OnInit {
|
||||
|
||||
|
||||
this.taskType = this.navParams.get('taskAction');
|
||||
console.log('this.taskType ',this.taskType )
|
||||
// console.log('this.taskType ',this.taskType )
|
||||
|
||||
this.postData = new Despacho();
|
||||
this.participants = this.participants = new Array();
|
||||
@@ -132,7 +132,7 @@ export class CreateProcessPage implements OnInit {
|
||||
} else {
|
||||
this.placeholderSubject = 'Selecione o tipo de assunto*'
|
||||
}
|
||||
|
||||
|
||||
|
||||
let NumberPDPP;
|
||||
|
||||
@@ -184,7 +184,7 @@ export class CreateProcessPage implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
console.log('crete process')
|
||||
// console.log('crete process')
|
||||
this.getSubjectType();
|
||||
/* setTimeout(() => {
|
||||
this.selectedTypes = ['99999850'];
|
||||
@@ -209,7 +209,7 @@ export class CreateProcessPage implements OnInit {
|
||||
|
||||
getSubjectType() {
|
||||
this.processes.GetSubjectType().subscribe(res => {
|
||||
console.log('subjectTypes',res)
|
||||
// console.log('subjectTypes',res)
|
||||
this.subjectTypes = res;
|
||||
});
|
||||
}
|
||||
@@ -326,7 +326,7 @@ export class CreateProcessPage implements OnInit {
|
||||
} else {
|
||||
|
||||
if (this.loggeduser.Profile != 'PR') {
|
||||
console.log('Despacho MD');
|
||||
// console.log('Despacho MD');
|
||||
switch (this.taskType) {
|
||||
case '0': // Despacho
|
||||
this.postData = {
|
||||
|
||||
@@ -12,6 +12,26 @@ import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
import { TaskService } from 'src/app/services/task.service'
|
||||
import { z } from "zod";
|
||||
|
||||
|
||||
const Bodyschema = z.object({
|
||||
SerialNumber: z.string(),
|
||||
DispatchDocId: z.number(),
|
||||
FolderID: z.any(),
|
||||
Subject: z.string(),
|
||||
Comment: z.string().optional(),
|
||||
DelegatedUserEmail: z.string().email(),
|
||||
UserId: z.any(),
|
||||
DraftIds: z.string(),
|
||||
})
|
||||
|
||||
|
||||
const ProsSchema = z.object({
|
||||
DraftIds: z.string(),
|
||||
})
|
||||
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-delegar',
|
||||
@@ -64,6 +84,19 @@ export class DelegarPage implements OnInit {
|
||||
/* this.postData.EndDate = new Date(selectedEndDate.setMinutes(new Date().getMinutes() + 30)); */
|
||||
|
||||
this.hideThisFeature = this.navParams.get('showAttachmentBtn');
|
||||
|
||||
|
||||
const result = ProsSchema.safeParse(this.task);
|
||||
|
||||
if(!result.success) {
|
||||
console.log(result)
|
||||
console.log("result")
|
||||
console.log(result["error"])
|
||||
} else {
|
||||
console.log(result.data)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -86,6 +119,7 @@ export class DelegarPage implements OnInit {
|
||||
else if(this.taskParticipants.length > 1){
|
||||
this.toastService._badRequest("Selecione apenas um destinatário");
|
||||
}
|
||||
|
||||
else {
|
||||
let body = {
|
||||
"SerialNumber": this.task.SerialNumber,
|
||||
@@ -94,8 +128,11 @@ export class DelegarPage implements OnInit {
|
||||
"Subject": this.task.Folio,
|
||||
"Comment": this.note,
|
||||
"DelegatedUserEmail": this.taskParticipants[0].EmailAddress,
|
||||
"DraftIds": this.task.DraftIds,
|
||||
"UserId": this.taskParticipants[0].Id
|
||||
}
|
||||
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
this.processes.DelegateTask(body).subscribe(res=>{
|
||||
|
||||
@@ -545,15 +545,15 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
||||
});
|
||||
}
|
||||
this.contacts = result;
|
||||
console.log('Attendes Email', this.loggeduser.Email)
|
||||
//console.log('Attendes Email', this.loggeduser.Email)
|
||||
let filterLoggedUserEmail = this.contacts.filter(item => item.RoleDescription == "Ministro e Director do Gabinete do PR")
|
||||
console.log('Attendes Email', filterLoggedUserEmail)
|
||||
//console.log('Attendes Email', filterLoggedUserEmail)
|
||||
|
||||
this.contacts = filterLoggedUserEmail;
|
||||
const newAttendees: EventPerson[] = this.contacts;
|
||||
|
||||
this.setIntervenient(newAttendees);
|
||||
console.log('Attendes Email', this.contacts)
|
||||
//console.log('Attendes Email', this.contacts)
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ export class ViewDocumentPage implements OnInit {
|
||||
}
|
||||
|
||||
async openBookMeetingModal() {
|
||||
console.log('this.Document----------', this.Document)
|
||||
//console.log('this.Document----------', this.Document)
|
||||
let classs;
|
||||
if( window.innerWidth < 701) {
|
||||
classs = 'book-meeting-modal modal modal-desktop'
|
||||
@@ -165,7 +165,7 @@ export class ViewDocumentPage implements OnInit {
|
||||
}
|
||||
// check passing
|
||||
|
||||
console.log('this.Document----------openExpedientActionsModal', this.Document)
|
||||
//console.log('this.Document----------openExpedientActionsModal', this.Document)
|
||||
const modal = await this.modalController.create({
|
||||
component: ExpedientTaskModalPage,
|
||||
componentProps: {
|
||||
|
||||
Reference in New Issue
Block a user