mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
a lot of changes
This commit is contained in:
@@ -103,11 +103,13 @@ export class DespachoService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
EfectuarDespacho({ note, documents = [], serialnumber, activityInstanceName }) {
|
EfectuarDespacho({ note, documents = [], serialnumber, activityInstanceName }) {
|
||||||
|
console.log('activityInstanceName', activityInstanceName)
|
||||||
let body;
|
let body;
|
||||||
if (activityInstanceName == 'Concluir Despacho'
|
if (activityInstanceName == 'Concluir Despacho'
|
||||||
|| activityInstanceName == 'Concluir Parecer'
|
|| activityInstanceName == 'Concluir Parecer'
|
||||||
|| activityInstanceName == 'Concluir Deferimento'
|
|| activityInstanceName == 'Concluir Deferimento'
|
||||||
|| activityInstanceName == 'Tarefa de Deferimento'
|
|| activityInstanceName == 'Tarefa de Deferimento'
|
||||||
|
|| activityInstanceName == 'Diploma Assinado'
|
||||||
) {
|
) {
|
||||||
body = {
|
body = {
|
||||||
"serialNumber": serialnumber,
|
"serialNumber": serialnumber,
|
||||||
@@ -118,8 +120,17 @@ export class DespachoService {
|
|||||||
},
|
},
|
||||||
"AttachmentList": documents,
|
"AttachmentList": documents,
|
||||||
}
|
}
|
||||||
|
} else if (activityInstanceName == 'Revisar Diploma') {
|
||||||
|
body = {
|
||||||
|
"serialNumber": serialnumber,
|
||||||
|
"action": "Aprovar",
|
||||||
|
"ActionTypeId": 94,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": note,
|
||||||
|
},
|
||||||
|
"AttachmentList": documents,
|
||||||
}
|
}
|
||||||
else{
|
} else {
|
||||||
body = {
|
body = {
|
||||||
"serialNumber": serialnumber,
|
"serialNumber": serialnumber,
|
||||||
"action": "Conhecimento",
|
"action": "Conhecimento",
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
appearance="fill"
|
appearance="fill"
|
||||||
class="width-100 d-block"
|
class="width-100 d-block"
|
||||||
appearance="none">
|
appearance="none">
|
||||||
<mat-select [(ngModel)]="selectedTypes" multiple placeholder="Selecione o tipo de assunto*">
|
<mat-select [(ngModel)]="selectedTypes" placeholder="Selecione o tipo de assunto*">
|
||||||
<mat-option *ngFor="let type of subjectTypes" value="{{type.Code}}">{{type.Description}}</mat-option>
|
<mat-option *ngFor="let type of subjectTypes" value="{{type.Code}}">{{type.Description}}</mat-option>
|
||||||
</mat-select>
|
</mat-select>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|||||||
@@ -175,6 +175,7 @@ export class CreateProcessPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
console.log('crete process')
|
||||||
this.getSubjectType();
|
this.getSubjectType();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.selectedTypes = ['99999850'];
|
this.selectedTypes = ['99999850'];
|
||||||
@@ -199,6 +200,7 @@ export class CreateProcessPage implements OnInit {
|
|||||||
|
|
||||||
getSubjectType() {
|
getSubjectType() {
|
||||||
this.processes.GetSubjectType().subscribe(res => {
|
this.processes.GetSubjectType().subscribe(res => {
|
||||||
|
console.log('subjectTypes',res)
|
||||||
this.subjectTypes = res;
|
this.subjectTypes = res;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -315,6 +317,7 @@ export class CreateProcessPage implements OnInit {
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (this.loggeduser.Profile != 'PR') {
|
if (this.loggeduser.Profile != 'PR') {
|
||||||
|
console.log('Despacho MD');
|
||||||
switch (this.taskType) {
|
switch (this.taskType) {
|
||||||
case '0': // Despacho
|
case '0': // Despacho
|
||||||
this.postData = {
|
this.postData = {
|
||||||
@@ -399,6 +402,7 @@ export class CreateProcessPage implements OnInit {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else if (this.loggeduser.Profile == 'PR') {
|
} else if (this.loggeduser.Profile == 'PR') {
|
||||||
|
console.log('Despacho PR');
|
||||||
switch (this.taskType) {
|
switch (this.taskType) {
|
||||||
case '0': // Despacho PR
|
case '0': // Despacho PR
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,202 @@
|
|||||||
|
import { Attachment } from './attachment.model';
|
||||||
|
import { EventBody } from './eventbody.model';
|
||||||
|
import { EventPerson } from './eventperson.model';
|
||||||
|
|
||||||
|
|
||||||
|
export interface EventRecurrence {
|
||||||
|
Type: number | string;
|
||||||
|
Day?: number;
|
||||||
|
DayOfWeek?: number;
|
||||||
|
Month?: number | string;
|
||||||
|
LastOccurrence?: Date | string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class EventToAprove {
|
||||||
|
EventProcess: {
|
||||||
|
EventId: string;
|
||||||
|
Subject: string;
|
||||||
|
Body: EventBody;
|
||||||
|
Location: string;
|
||||||
|
CalendarId: string;
|
||||||
|
CalendarName: string;
|
||||||
|
StartDate: Date;
|
||||||
|
EndDate: Date;
|
||||||
|
EventType: string;
|
||||||
|
ParticipantsList: EventPerson[];
|
||||||
|
IsAllDayEvent: boolean;
|
||||||
|
IsMeeting: boolean;
|
||||||
|
IsRecurring: boolean;
|
||||||
|
AppointmentState: number;
|
||||||
|
TimeZone: string;
|
||||||
|
Organizer: any
|
||||||
|
Category: string;
|
||||||
|
HasAttachments: boolean;
|
||||||
|
EventRecurrence: EventRecurrence;
|
||||||
|
Status: string;
|
||||||
|
wxUserID: number;
|
||||||
|
Role: number
|
||||||
|
}
|
||||||
|
Attachments?: Attachment[];
|
||||||
|
InstanceID: string
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// event to approve details ================================================
|
||||||
|
export interface Originator {
|
||||||
|
email: string;
|
||||||
|
manager: string;
|
||||||
|
displayName: string;
|
||||||
|
fqn: string;
|
||||||
|
username: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface WorkflowInstanceDataFields {
|
||||||
|
Body: string;
|
||||||
|
Location: string;
|
||||||
|
Subject: string;
|
||||||
|
StartDate: string;
|
||||||
|
EndDate: string;
|
||||||
|
Participants?: string;
|
||||||
|
CC?: string;
|
||||||
|
ReviewUserComment?: string;
|
||||||
|
Role?: number;
|
||||||
|
MDName: string;
|
||||||
|
MDEmail: string;
|
||||||
|
OriginatorComments?: string;
|
||||||
|
Status?: string;
|
||||||
|
TimeZone?: string;
|
||||||
|
Agenda: string;
|
||||||
|
EventType: string;
|
||||||
|
EventID?: string;
|
||||||
|
IsRecurring?: any;
|
||||||
|
HasAttachments?: boolean;
|
||||||
|
ParticipantsList?: any;
|
||||||
|
EventOrganizer?: string;
|
||||||
|
CreateEvent?: string;
|
||||||
|
IsAllDayEvent: boolean;
|
||||||
|
SerializedItem?: string;
|
||||||
|
MDwxUserID?: number;
|
||||||
|
DeserializedItem?: string;
|
||||||
|
Message: string;
|
||||||
|
InstanceId: string;
|
||||||
|
Header?: string;
|
||||||
|
RecurringString?: string;
|
||||||
|
LastOccurrence: string;
|
||||||
|
OccurrenceType: string;
|
||||||
|
SerialNumber?: string;
|
||||||
|
UserEmail?: string;
|
||||||
|
PREmail?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface EventToApproveDetails {
|
||||||
|
serialNumber: string;
|
||||||
|
originator?: Originator;
|
||||||
|
actions?: string[];
|
||||||
|
activityInstanceName?: string;
|
||||||
|
workflowInstanceFolio?: string;
|
||||||
|
taskStartDate?: string;
|
||||||
|
workflowID?: number;
|
||||||
|
workflowInstanceID?: number;
|
||||||
|
workflowName?: string;
|
||||||
|
workflowDisplayName?: string;
|
||||||
|
formURL?: string;
|
||||||
|
workflowInstanceDataFields: WorkflowInstanceDataFields;
|
||||||
|
totalDocuments?: any;
|
||||||
|
Documents?: any;
|
||||||
|
}
|
||||||
|
// ================================================================================
|
||||||
|
|
||||||
|
|
||||||
|
// event event to approve ================
|
||||||
|
export interface ParticipantsList {
|
||||||
|
Id: number;
|
||||||
|
EmailAddress: string;
|
||||||
|
Name: string;
|
||||||
|
IsRequired: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export interface EventToApproveEdit {
|
||||||
|
SerialNumber: string;
|
||||||
|
Body: string;
|
||||||
|
Location: string;
|
||||||
|
Subject: string;
|
||||||
|
StartDate: Date | string;
|
||||||
|
EndDate: Date | string;
|
||||||
|
ReviewUserComment: string;
|
||||||
|
MDName: string;
|
||||||
|
MDEmail: string;
|
||||||
|
IsAllDayEvent: boolean;
|
||||||
|
Status: string;
|
||||||
|
Category: string
|
||||||
|
EventType: string;
|
||||||
|
IsRecurring: boolean;
|
||||||
|
ParticipantsList: ParticipantsList[];
|
||||||
|
Message: string;
|
||||||
|
EventRecurrence: EventRecurrence;
|
||||||
|
Participants?: string;
|
||||||
|
CC?: string;
|
||||||
|
Agenda: string;
|
||||||
|
HasAttachments?: boolean;
|
||||||
|
EventOrganizer?: string;
|
||||||
|
InstanceId?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
// // ================================================================================
|
||||||
|
// export interface EventToApproveDetails {
|
||||||
|
// serialNumber: string;
|
||||||
|
// originator: {
|
||||||
|
// email: string;
|
||||||
|
// manager: string;
|
||||||
|
// displayName: string;
|
||||||
|
// fqn: string;
|
||||||
|
// username: string;
|
||||||
|
// }[]
|
||||||
|
// actions: string[];
|
||||||
|
// activityInstanceName: string;
|
||||||
|
// workflowInstanceFolio: string;
|
||||||
|
// taskStartDate: string;
|
||||||
|
// workflowID: number;
|
||||||
|
// workflowInstanceID: number;
|
||||||
|
// workflowName: string;
|
||||||
|
// workflowDisplayName: string;
|
||||||
|
// formURL: string;
|
||||||
|
// workflowInstanceDataFields: {
|
||||||
|
// Body: string;
|
||||||
|
// Location: string;
|
||||||
|
// Subject: string;
|
||||||
|
// StartDate: string;
|
||||||
|
// EndDate: string;
|
||||||
|
// Participants: string;
|
||||||
|
// CC: string;
|
||||||
|
// Private: boolean;
|
||||||
|
// ReviewUserComment: string;
|
||||||
|
// MDName: string;
|
||||||
|
// MDEmail: string;
|
||||||
|
// OriginatorComments: string;
|
||||||
|
// Agenda: string;
|
||||||
|
// EventType: string;
|
||||||
|
// TimeZone: string;
|
||||||
|
// EventID: string;
|
||||||
|
// HasAttachments: boolean;
|
||||||
|
// ParticipantsList: {
|
||||||
|
// $type?: any;
|
||||||
|
// EmailAddress: string;
|
||||||
|
// Name: string;
|
||||||
|
// IsRequired: boolean;
|
||||||
|
// }[]
|
||||||
|
// EventOrganizer: string;
|
||||||
|
// CreatEvent: string;
|
||||||
|
// IsAllDayEvent: boolean;
|
||||||
|
// MDwxUserID: number;
|
||||||
|
// SerializedItem: string;
|
||||||
|
// DeserializedItem: string;
|
||||||
|
// Status: string;
|
||||||
|
// Message: string;
|
||||||
|
// InstanceId: string;
|
||||||
|
// }
|
||||||
|
// totalDocuments?: any;
|
||||||
|
// Documents?: any;
|
||||||
|
// }
|
||||||
@@ -90,7 +90,7 @@ export class UserSession {
|
|||||||
UserName: string
|
UserName: string
|
||||||
Password: string
|
Password: string
|
||||||
RochetChatUserId: string
|
RochetChatUserId: string
|
||||||
Profile: 'PR' | 'MDGPR' | 'Consultant' | 'Unknown' ;
|
Profile: 'PR' | 'MDGPR' | 'Consultant' | 'SGGPR' | 'Unknown' ;
|
||||||
LoginPreference: 'None' | 'Password' | 'Pin' | null;
|
LoginPreference: 'None' | 'Password' | 'Pin' | null;
|
||||||
PIN: string
|
PIN: string
|
||||||
Inactivity: boolean
|
Inactivity: boolean
|
||||||
|
|||||||
@@ -190,6 +190,10 @@ export class EditEventPage implements OnInit {
|
|||||||
})
|
})
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
|
ngOnChanges(changes: any): void {
|
||||||
|
this.loadedEventAttachments = this.postEvent?.Attachments
|
||||||
|
}
|
||||||
|
|
||||||
close() {
|
close() {
|
||||||
this.modalController.dismiss();
|
this.modalController.dismiss();
|
||||||
}
|
}
|
||||||
@@ -421,7 +425,7 @@ export class EditEventPage implements OnInit {
|
|||||||
this.isEventEdited = true;
|
this.isEventEdited = true;
|
||||||
|
|
||||||
|
|
||||||
await this.saveDocument()
|
/* await this.saveDocument() */
|
||||||
|
|
||||||
this.goBack();
|
this.goBack();
|
||||||
}
|
}
|
||||||
@@ -595,6 +599,7 @@ export class EditEventPage implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
this.loadedEventAttachments.push(ApplicationIdDocumentToSave)
|
this.loadedEventAttachments.push(ApplicationIdDocumentToSave)
|
||||||
|
this.postEvent.Attachments = this.loadedEventAttachments;
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import { SessionStore } from 'src/app/store/session.service';
|
|||||||
import { ChatMethodsService } from 'src/app/services/chat/chat-methods.service';
|
import { ChatMethodsService } from 'src/app/services/chat/chat-methods.service';
|
||||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||||
import { environment } from 'src/environments/environment';
|
import { environment } from 'src/environments/environment';
|
||||||
|
import { ProcessesService } from 'src/app/services/processes.service';
|
||||||
|
|
||||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||||
parse: {
|
parse: {
|
||||||
@@ -101,7 +102,8 @@ export class NewEventPage implements OnInit {
|
|||||||
public ThemeService: ThemeService,
|
public ThemeService: ThemeService,
|
||||||
private platform: Platform,
|
private platform: Platform,
|
||||||
private chatMethodService: ChatMethodsService,
|
private chatMethodService: ChatMethodsService,
|
||||||
private hhtpErrorHandle: HttpErrorHandle
|
private hhtpErrorHandle: HttpErrorHandle,
|
||||||
|
private processeService: ProcessesService
|
||||||
) {
|
) {
|
||||||
this.loggeduser = SessionStore.user;
|
this.loggeduser = SessionStore.user;
|
||||||
this.postEvent = new Event();
|
this.postEvent = new Event();
|
||||||
@@ -387,6 +389,7 @@ export class NewEventPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async save() {
|
async save() {
|
||||||
|
|
||||||
this.injectValidation()
|
this.injectValidation()
|
||||||
this.runValidation()
|
this.runValidation()
|
||||||
|
|
||||||
@@ -426,6 +429,12 @@ export class NewEventPage implements OnInit {
|
|||||||
eventId = await this.eventService.postEventGeneric(this.postEvent, this.postEvent.CalendarName, CalendarId).toPromise();
|
eventId = await this.eventService.postEventGeneric(this.postEvent, this.postEvent.CalendarName, CalendarId).toPromise();
|
||||||
this.hhtpErrorHandle.httpsSucessMessagge('new event')
|
this.hhtpErrorHandle.httpsSucessMessagge('new event')
|
||||||
|
|
||||||
|
} else if (this.loggeduser.Profile == 'SGGPR') {
|
||||||
|
|
||||||
|
|
||||||
|
this.saveAproveEvent();
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
const CalendarId = this.selectedCalendarId()
|
const CalendarId = this.selectedCalendarId()
|
||||||
@@ -436,6 +445,9 @@ export class NewEventPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//foi adicionado este if para não ter de fazer muitas alterações sobre a criação dos eventos. Deve ser refatorado
|
||||||
|
if (this.loggeduser.Profile != 'SGGPR') {
|
||||||
|
|
||||||
const DocumentToSave: EventAttachment[] = this.documents.map((e) => {
|
const DocumentToSave: EventAttachment[] = this.documents.map((e) => {
|
||||||
return {
|
return {
|
||||||
SourceTitle: e.Assunto,
|
SourceTitle: e.Assunto,
|
||||||
@@ -474,6 +486,7 @@ export class NewEventPage implements OnInit {
|
|||||||
this.hhtpErrorHandle.httpsSucessMessagge('new event');
|
this.hhtpErrorHandle.httpsSucessMessagge('new event');
|
||||||
let data = Object.assign(this.postEvent, { id: eventId })
|
let data = Object.assign(this.postEvent, { id: eventId })
|
||||||
this.modalController.dismiss(data);
|
this.modalController.dismiss(data);
|
||||||
|
}
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.hhtpErrorHandle.httpStatusHandle(error)
|
this.hhtpErrorHandle.httpStatusHandle(error)
|
||||||
@@ -616,4 +629,204 @@ export class NewEventPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Deve ser removido posteriormente
|
||||||
|
async saveAproveEvent() {
|
||||||
|
|
||||||
|
console.log(this.postEvent)
|
||||||
|
console.log(this.postEvent.CalendarName)
|
||||||
|
console.log(this.CalendarName)
|
||||||
|
console.log(this.eventService.calendarNamesAry)
|
||||||
|
const CalendarId = this.selectedCalendarId()
|
||||||
|
|
||||||
|
let selectedCalendar
|
||||||
|
try {
|
||||||
|
selectedCalendar = this.eventService.calendarNamesAry.find(calendar => calendar.Fullname === this.CalendarName)
|
||||||
|
} catch (error) {
|
||||||
|
|
||||||
|
}
|
||||||
|
console.log('selectedCalendar', selectedCalendar)
|
||||||
|
|
||||||
|
if (selectedCalendar) {
|
||||||
|
if (selectedCalendar.Role = 'Presidente da República') {
|
||||||
|
let loader = this.toastService.loading();
|
||||||
|
|
||||||
|
const DocumentToSave: EventAttachment[] = this.documents.map((e) => {
|
||||||
|
return {
|
||||||
|
SourceTitle: e.Assunto,
|
||||||
|
ParentId: "AGD_" + this.loggeduser.UserName + "_" + this.processeService.generateInstaceFormatDate(),
|
||||||
|
Source: '1',
|
||||||
|
SourceId: e.Id,
|
||||||
|
ApplicationId: e.ApplicationType.toString(),
|
||||||
|
Id: '',
|
||||||
|
Link: '',
|
||||||
|
SerialNumber: ''
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
let body = this.eventToaproveBody(this.postEvent, CalendarId, this.loggeduser.RoleID, this.loggeduser.UserId, DocumentToSave);
|
||||||
|
await this.processeService.createEventToAprove(this.postEvent.CalendarName, 'pr', body).subscribe((id) => {
|
||||||
|
loader.remove()
|
||||||
|
this.modalController.dismiss();
|
||||||
|
this.hhtpErrorHandle.httpsSucessMessagge('new event to aprove')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* DocumentToSave.forEach((attachments, i) => {
|
||||||
|
this.attachmentsService.setEventAttachmentById(attachments).subscribe((res) => {
|
||||||
|
if (DocumentToSave.length == (i + 1)) {
|
||||||
|
this.afterSave();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
if (DocumentToSave.length == 0) {
|
||||||
|
this.afterSave();
|
||||||
|
} */
|
||||||
|
|
||||||
|
}, (error) => {
|
||||||
|
loader.remove()
|
||||||
|
this.hhtpErrorHandle.httpStatusHandle(error)
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} else if (selectedCalendar.Role = 'Ministro e Director do Gabinete do PR') {
|
||||||
|
let loader = this.toastService.loading();
|
||||||
|
|
||||||
|
const DocumentToSave: EventAttachment[] = this.documents.map((e) => {
|
||||||
|
return {
|
||||||
|
SourceTitle: e.Assunto,
|
||||||
|
ParentId: "AGD_" + this.loggeduser.UserName + "_" + this.processeService.generateInstaceFormatDate(),
|
||||||
|
Source: '1',
|
||||||
|
SourceId: e.Id,
|
||||||
|
ApplicationId: e.ApplicationType.toString(),
|
||||||
|
Id: '',
|
||||||
|
Link: '',
|
||||||
|
SerialNumber: ''
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
let body = this.eventToaproveBody(this.postEvent, CalendarId, this.loggeduser.RoleID, this.loggeduser.UserId, DocumentToSave);
|
||||||
|
await this.processeService.createEventToAprove(this.postEvent.CalendarName, 'md', body).subscribe((id) => {
|
||||||
|
loader.remove()
|
||||||
|
this.modalController.dismiss();
|
||||||
|
this.hhtpErrorHandle.httpsSucessMessagge('new event to aprove')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* DocumentToSave.forEach((attachments, i) => {
|
||||||
|
this.attachmentsService.setEventAttachmentById(attachments).subscribe((res) => {
|
||||||
|
if (DocumentToSave.length == (i + 1)) {
|
||||||
|
this.afterSave();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
if (DocumentToSave.length == 0) {
|
||||||
|
this.afterSave();
|
||||||
|
} */
|
||||||
|
|
||||||
|
}, (error) => {
|
||||||
|
loader.remove()
|
||||||
|
this.hhtpErrorHandle.httpStatusHandle(error)
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!selectedCalendar && this.CalendarName == "Meu calendario") {
|
||||||
|
console.log('SG generic')
|
||||||
|
this.postEvent.CalendarName
|
||||||
|
|
||||||
|
const CalendarId = this.selectedCalendarId()
|
||||||
|
let loader = this.toastService.loading();
|
||||||
|
|
||||||
|
this.postEvent.CalendarId = CalendarId
|
||||||
|
|
||||||
|
this.eventService.postEventGeneric(this.postEvent, this.postEvent.CalendarName, CalendarId).subscribe(
|
||||||
|
(id) => {
|
||||||
|
loader.remove();
|
||||||
|
|
||||||
|
const eventId: any = id;
|
||||||
|
|
||||||
|
const DocumentToSave: EventAttachment[] = this.documents.map((e) => {
|
||||||
|
return {
|
||||||
|
SourceTitle: e.Assunto,
|
||||||
|
ParentId: eventId,
|
||||||
|
Source: '1',
|
||||||
|
SourceId: e.Id,
|
||||||
|
ApplicationId: e.ApplicationType.toString(),
|
||||||
|
Id: '',
|
||||||
|
Link: '',
|
||||||
|
SerialNumber: ''
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
DocumentToSave.forEach((attachments, i) => {
|
||||||
|
this.attachmentsService.setEventAttachmentById(attachments).subscribe((res) => {
|
||||||
|
if (DocumentToSave.length == (i + 1)) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
if (DocumentToSave.length == 0) {
|
||||||
|
}
|
||||||
|
|
||||||
|
this.hhtpErrorHandle.httpsSucessMessagge('new event')
|
||||||
|
let data = {
|
||||||
|
"subject": this.postEvent.Subject,
|
||||||
|
"start": this.postEvent.StartDate,
|
||||||
|
"end": this.postEvent.EndDate,
|
||||||
|
"venue": this.postEvent.Location,
|
||||||
|
"id": id,
|
||||||
|
"calendarId": CalendarId
|
||||||
|
}
|
||||||
|
if (this.roomId) {
|
||||||
|
this.chatMethodService.sendMessage(this.roomId, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
let dataa = Object.assign(this.postEvent, { id: eventId })
|
||||||
|
this.modalController.dismiss(dataa);
|
||||||
|
}, (error) => {
|
||||||
|
|
||||||
|
loader.remove()
|
||||||
|
this.hhtpErrorHandle.httpStatusHandle(error)
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deve ser removido posteriormente
|
||||||
|
eventToaproveBody(event, calendarId, role, userId, attachments) {
|
||||||
|
let toAproveObject = {
|
||||||
|
"EventProcess": {
|
||||||
|
"Body": event.Body,
|
||||||
|
"Location": event.Location,
|
||||||
|
"Subject": event.Subject,
|
||||||
|
"StartDate": event.StartDate,
|
||||||
|
"EndDate": event.EndDate,
|
||||||
|
"Status": "Active",
|
||||||
|
"IsAllDayEvent": event.IsRecurring,
|
||||||
|
"EventType": event.EventType,
|
||||||
|
"ParticipantsList": event.Attendees,
|
||||||
|
"EventRecurrence": event.EventRecurrence,
|
||||||
|
"HasAttachments": event.HasAttachments,
|
||||||
|
"CalendarId": calendarId,
|
||||||
|
"Role": role,
|
||||||
|
"wxUserID": userId,
|
||||||
|
"TimeZone": "W. Central Africa Standard Time"
|
||||||
|
},
|
||||||
|
"Attachments": attachments,
|
||||||
|
"InstanceID": "AGD_" + this.loggeduser.UserName + "_" + this.processeService.generateInstaceFormatDate()
|
||||||
|
}
|
||||||
|
|
||||||
|
return toAproveObject;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -245,8 +245,8 @@
|
|||||||
<div></div>
|
<div></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="schedule-details">
|
<div class="schedule-details">
|
||||||
<div class="location">{{event.Subject}}</div>
|
<div class="description">{{event.Subject}}</div>
|
||||||
<div class="description">
|
<div class="location">
|
||||||
<p>{{event.Location}}</p>
|
<p>{{event.Location}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+3
-3
@@ -22,11 +22,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<button (click)="openAddNoteModal('Arquivo')" class="btn-cancel" shape="round" >Arquivar</button>
|
<button (click)="openAddNoteModal('Arquivo')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||||
<div class="solid"></div>
|
<!-- <div class="solid"></div> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
<!-- <button (click)="openExpedientActionsModal('0',fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button> -->
|
||||||
<div class="solid"></div>
|
<!-- <div class="solid"></div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
+1
@@ -113,5 +113,6 @@
|
|||||||
<button class="btn-cancel cursor-pointer" shape="round" (click)="emendTask(loadedEvent.serialNumber)">Enviar para Revisão</button>
|
<button class="btn-cancel cursor-pointer" shape="round" (click)="emendTask(loadedEvent.serialNumber)">Enviar para Revisão</button>
|
||||||
<button class="btn-no-color cursor-pointer" shape="round" (click)="openMenu()"> <ion-icon name="ellipsis-vertical-outline"></ion-icon></button>
|
<button class="btn-no-color cursor-pointer" shape="round" (click)="openMenu()"> <ion-icon name="ellipsis-vertical-outline"></ion-icon></button>
|
||||||
<button class="btn-cancel cursor-pointer" shape="round" (click)="approveTask(loadedEvent.serialNumber)">Aprovar</button>
|
<button class="btn-cancel cursor-pointer" shape="round" (click)="approveTask(loadedEvent.serialNumber)">Aprovar</button>
|
||||||
|
<button class="btn-cancel cursor-pointer" shape="round" (click)="rejectTask(loadedEvent.serialNumber)">Eliminar</button>
|
||||||
</div>
|
</div>
|
||||||
</ion-footer>
|
</ion-footer>
|
||||||
|
|||||||
+2
-2
@@ -127,14 +127,14 @@ export class ApproveEventModalPage implements OnInit {
|
|||||||
|
|
||||||
async rejectTask(serialNumber:string) {
|
async rejectTask(serialNumber:string) {
|
||||||
|
|
||||||
let body = { "serialNumber": serialNumber, "action": "Descartar" }
|
let body = { "serialNumber": serialNumber, "action": "Rejeitar" }
|
||||||
|
|
||||||
const loader = this.toastService.loading()
|
const loader = this.toastService.loading()
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await this.processes.PostTaskAction(body).toPromise()
|
await this.processes.PostTaskAction(body).toPromise()
|
||||||
|
|
||||||
this.toastService._successMessage('Evento rejeitado', () =>{
|
this.toastService._successMessage('Evento Eliminado!', () =>{
|
||||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
+3
-2
@@ -472,9 +472,10 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
if (res) {
|
if (res) {
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
this.documents.push(data.selected);
|
this.documents.push(data.selected);
|
||||||
|
let body
|
||||||
await this.documents.forEach(async (element: any) => {
|
await this.documents.forEach(async (element: any) => {
|
||||||
|
|
||||||
let body = {
|
body = {
|
||||||
"InstanceID": this.task.InstanceID,
|
"InstanceID": this.task.InstanceID,
|
||||||
"WorkflowDisplayName": this.task.WorkflowName,
|
"WorkflowDisplayName": this.task.WorkflowName,
|
||||||
"FolderID": this.task.FolderId,
|
"FolderID": this.task.FolderId,
|
||||||
@@ -485,6 +486,7 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
|
|
||||||
const Attachments = this.searchDocumentPipe.transformToAttachment(element)
|
const Attachments = this.searchDocumentPipe.transformToAttachment(element)
|
||||||
body.Attachments = Attachments;
|
body.Attachments = Attachments;
|
||||||
|
});
|
||||||
|
|
||||||
const loader = this.toastService.loading()
|
const loader = this.toastService.loading()
|
||||||
|
|
||||||
@@ -500,7 +502,6 @@ export class ExpedienteDetailPage implements OnInit {
|
|||||||
this.toastService._badRequest()
|
this.toastService._badRequest()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.LoadTaskDetail(this.serialNumber);
|
this.LoadTaskDetail(this.serialNumber);
|
||||||
|
|||||||
@@ -147,6 +147,8 @@ export class AuthService {
|
|||||||
session.Profile = 'MDGPR'
|
session.Profile = 'MDGPR'
|
||||||
} else if(session.RoleID == 99999872) {
|
} else if(session.RoleID == 99999872) {
|
||||||
session.Profile = 'Consultant'
|
session.Profile = 'Consultant'
|
||||||
|
} else if(session.RoleID == 99999886) {
|
||||||
|
session.Profile = 'SGGPR'
|
||||||
}else {
|
}else {
|
||||||
session.Profile = 'Unknown'
|
session.Profile = 'Unknown'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ export class HttpErrorHandle {
|
|||||||
this.toastService._successMessage('Evento aprovado!')
|
this.toastService._successMessage('Evento aprovado!')
|
||||||
break;
|
break;
|
||||||
case 'Rejeitar':
|
case 'Rejeitar':
|
||||||
this.toastService._successMessage('Evento Rejeitado!')
|
this.toastService._successMessage('Evento Eliminado!')
|
||||||
break;
|
break;
|
||||||
case 'Dar o meu Parecer':
|
case 'Dar o meu Parecer':
|
||||||
this.toastService._successMessage('Parecer enviado!')
|
this.toastService._successMessage('Parecer enviado!')
|
||||||
|
|||||||
@@ -66,8 +66,7 @@ export class ProcessesService {
|
|||||||
return this.http.post(`${geturl}`, formData, options);
|
return this.http.post(`${geturl}`, formData, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
GetTasksList(processname: typeof GetTasksListType, onlycount:boolean): Observable<fullTaskList[]>
|
GetTasksList(processname: typeof GetTasksListType, onlycount: boolean): Observable<fullTaskList[]> {
|
||||||
{
|
|
||||||
const geturl = environment.apiURL + 'tasks/List';
|
const geturl = environment.apiURL + 'tasks/List';
|
||||||
let params = new HttpParams();
|
let params = new HttpParams();
|
||||||
|
|
||||||
@@ -209,8 +208,7 @@ export class ProcessesService {
|
|||||||
return this.http.get<any>(`${geturl}`, options);
|
return this.http.get<any>(`${geturl}`, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
FindTaskDocId(serialnumber:string): Observable<any>
|
FindTaskDocId(serialnumber: string): Observable<any> {
|
||||||
{
|
|
||||||
const geturl = environment.apiURL + 'Tasks/FindExpedienteDocId';
|
const geturl = environment.apiURL + 'Tasks/FindExpedienteDocId';
|
||||||
let params = new HttpParams();
|
let params = new HttpParams();
|
||||||
|
|
||||||
@@ -223,8 +221,7 @@ export class ProcessesService {
|
|||||||
return this.http.get<any>(`${geturl}`, options);
|
return this.http.get<any>(`${geturl}`, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
GetMDOficialTasks(): Observable<any>
|
GetMDOficialTasks(): Observable<any> {
|
||||||
{
|
|
||||||
const geturl = environment.apiURL + 'tasks/GetMDOficialTasks';
|
const geturl = environment.apiURL + 'tasks/GetMDOficialTasks';
|
||||||
let options = {
|
let options = {
|
||||||
headers: this.headers,
|
headers: this.headers,
|
||||||
@@ -232,8 +229,7 @@ export class ProcessesService {
|
|||||||
return this.http.get<any>(`${geturl}`, options);
|
return this.http.get<any>(`${geturl}`, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
GetMDPersonalTasks(): Observable<any>
|
GetMDPersonalTasks(): Observable<any> {
|
||||||
{
|
|
||||||
const geturl = environment.apiURL + 'tasks/GetMDPersonalTasks';
|
const geturl = environment.apiURL + 'tasks/GetMDPersonalTasks';
|
||||||
let options = {
|
let options = {
|
||||||
headers: this.headers,
|
headers: this.headers,
|
||||||
@@ -241,8 +237,7 @@ export class ProcessesService {
|
|||||||
return this.http.get<any>(`${geturl}`, options);
|
return this.http.get<any>(`${geturl}`, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
GetToApprovedEvents(categoryname:string, count:string): Observable<any>
|
GetToApprovedEvents(categoryname: string, count: string): Observable<any> {
|
||||||
{
|
|
||||||
const geturl = environment.apiURL + 'Tasks/ListByCategory';
|
const geturl = environment.apiURL + 'Tasks/ListByCategory';
|
||||||
let params = new HttpParams();
|
let params = new HttpParams();
|
||||||
|
|
||||||
@@ -496,4 +491,33 @@ export class ProcessesService {
|
|||||||
return this.http.post<any>(`${geturl}`, file, options);
|
return this.http.post<any>(`${geturl}`, file, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
createEventToAprove(calendarType, agenda, body) {
|
||||||
|
|
||||||
|
const geturl = environment.apiURL + 'Processes/CreateEvent/' + agenda;
|
||||||
|
let params = new HttpParams();
|
||||||
|
params = params.set('calendarName', calendarType);
|
||||||
|
let options = {
|
||||||
|
headers: this.headers,
|
||||||
|
params: params
|
||||||
|
};
|
||||||
|
return this.http.post<any>(`${geturl}`, body, options);
|
||||||
|
}
|
||||||
|
|
||||||
|
generateInstaceFormatDate(): string {
|
||||||
|
const data = new Date();
|
||||||
|
|
||||||
|
const ano = data.getFullYear().toString().padStart(4, '0');
|
||||||
|
const mes = (data.getMonth() + 1).toString().padStart(2, '0');
|
||||||
|
const dia = data.getDate().toString().padStart(2, '0');
|
||||||
|
|
||||||
|
const horas = data.getHours().toString().padStart(2, '0');
|
||||||
|
const minutos = data.getMinutes().toString().padStart(2, '0');
|
||||||
|
const segundos = data.getSeconds().toString().padStart(2, '0');
|
||||||
|
const milissegundos = data.getMilliseconds().toString().padStart(3, '0');
|
||||||
|
|
||||||
|
const dataFormatada = `${ano}-${mes}-${dia}_${horas}:${minutos}:${segundos}.${milissegundos}`;
|
||||||
|
|
||||||
|
return dataFormatada;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ export class ApproveEventPage implements OnInit {
|
|||||||
|
|
||||||
async rejectTask(serialNumber:string) {
|
async rejectTask(serialNumber:string) {
|
||||||
|
|
||||||
let body = { "serialNumber": serialNumber, "action": "Descartar" }
|
let body = { "serialNumber": serialNumber, "action": "Rejeitar" }
|
||||||
|
|
||||||
|
|
||||||
const loader = this.toastService.loading()
|
const loader = this.toastService.loading()
|
||||||
|
|||||||
@@ -397,7 +397,7 @@ export class EditEventPage implements OnInit {
|
|||||||
this.clearPostEvent.emit();
|
this.clearPostEvent.emit();
|
||||||
this.deleteTemporaryData();
|
this.deleteTemporaryData();
|
||||||
|
|
||||||
await this.saveDocument()
|
/* await this.saveDocument() */
|
||||||
|
|
||||||
this.close();
|
this.close();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,9 @@ import { ServerConnectionService } from 'src/app/services/server-connection.serv
|
|||||||
import { SessionStore } from 'src/app/store/session.service';
|
import { SessionStore } from 'src/app/store/session.service';
|
||||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||||
import { environment } from 'src/environments/environment';
|
import { environment } from 'src/environments/environment';
|
||||||
|
import { EventToAprove } from 'src/app/models/eventToAprove.model';
|
||||||
|
import { ProcessesService } from 'src/app/services/processes.service';
|
||||||
|
import { Subject } from 'rxjs';
|
||||||
|
|
||||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||||
parse: {
|
parse: {
|
||||||
@@ -86,6 +89,7 @@ export class NewEventPage implements OnInit {
|
|||||||
@Output() setIntervenientCC = new EventEmitter<any>();
|
@Output() setIntervenientCC = new EventEmitter<any>();
|
||||||
|
|
||||||
postEvent: Event;
|
postEvent: Event;
|
||||||
|
postEventToAprove: EventToAprove;
|
||||||
@Output() onAddEvent = new EventEmitter<any>();
|
@Output() onAddEvent = new EventEmitter<any>();
|
||||||
@Output() openAttendeesComponent = new EventEmitter<any>();
|
@Output() openAttendeesComponent = new EventEmitter<any>();
|
||||||
@Output() clearContact = new EventEmitter<any>();
|
@Output() clearContact = new EventEmitter<any>();
|
||||||
@@ -135,7 +139,8 @@ export class NewEventPage implements OnInit {
|
|||||||
private dateAdapter: DateAdapter<any>,
|
private dateAdapter: DateAdapter<any>,
|
||||||
public ThemeService: ThemeService,
|
public ThemeService: ThemeService,
|
||||||
private chatMethodService: ChatMethodsService,
|
private chatMethodService: ChatMethodsService,
|
||||||
private hhtpErrorHandle: HttpErrorHandle
|
private hhtpErrorHandle: HttpErrorHandle,
|
||||||
|
private processeService: ProcessesService,
|
||||||
) {
|
) {
|
||||||
this.dateAdapter.setLocale('pt');
|
this.dateAdapter.setLocale('pt');
|
||||||
this.loggeduser = SessionStore.user;
|
this.loggeduser = SessionStore.user;
|
||||||
@@ -360,17 +365,21 @@ export class NewEventPage implements OnInit {
|
|||||||
if (this.eventService.calendarNamesType[this.CalendarName]?.['Oficial'] && this.eventService.calendarNamesType[this.CalendarName]?.['Pessoal']) {
|
if (this.eventService.calendarNamesType[this.CalendarName]?.['Oficial'] && this.eventService.calendarNamesType[this.CalendarName]?.['Pessoal']) {
|
||||||
|
|
||||||
this.CalendarNamesOptions = ['Oficial', 'Pessoal']
|
this.CalendarNamesOptions = ['Oficial', 'Pessoal']
|
||||||
|
console.log(this.postEvent.CalendarName)
|
||||||
|
|
||||||
} else if (this.eventService.calendarNamesType[this.CalendarName]?.['Oficial']) {
|
} else if (this.eventService.calendarNamesType[this.CalendarName]?.['Oficial']) {
|
||||||
this.CalendarNamesOptions = ['Oficial']
|
this.CalendarNamesOptions = ['Oficial']
|
||||||
this.postEvent.CalendarName = 'Oficial'
|
this.postEvent.CalendarName = 'Oficial'
|
||||||
|
console.log(this.postEvent.CalendarName)
|
||||||
|
|
||||||
} else if (this.eventService.calendarNamesType[this.CalendarName]?.['Pessoal']) {
|
} else if (this.eventService.calendarNamesType[this.CalendarName]?.['Pessoal']) {
|
||||||
this.CalendarNamesOptions = ['Pessoal']
|
this.CalendarNamesOptions = ['Pessoal']
|
||||||
this.postEvent.CalendarName = 'Pessoal'
|
this.postEvent.CalendarName = 'Pessoal'
|
||||||
|
console.log(this.postEvent.CalendarName)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.CalendarNamesOptions = ['Oficial', 'Pessoal']
|
this.CalendarNamesOptions = ['Oficial', 'Pessoal']
|
||||||
|
console.log(this.postEvent.CalendarName)
|
||||||
}
|
}
|
||||||
}, 50)
|
}, 50)
|
||||||
|
|
||||||
@@ -488,7 +497,7 @@ export class NewEventPage implements OnInit {
|
|||||||
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||||
|
|
||||||
|
|
||||||
if(this.documents.length >= 0) {
|
if (this.documents.length > 0) {
|
||||||
this.postEvent.HasAttachments = true;
|
this.postEvent.HasAttachments = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -612,6 +621,185 @@ export class NewEventPage implements OnInit {
|
|||||||
this.showLoader = false
|
this.showLoader = false
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
} else if (this.loggeduser.Profile == 'SGGPR') {
|
||||||
|
|
||||||
|
console.log(this.postEventToAprove)
|
||||||
|
console.log(this.postEvent)
|
||||||
|
console.log(this.postEvent.CalendarName)
|
||||||
|
console.log(this.CalendarName)
|
||||||
|
console.log(this.eventService.calendarNamesAry)
|
||||||
|
const CalendarId = this.selectedCalendarId()
|
||||||
|
|
||||||
|
let selectedCalendar
|
||||||
|
try {
|
||||||
|
selectedCalendar = this.eventService.calendarNamesAry.find(calendar => calendar.Fullname === this.CalendarName)
|
||||||
|
} catch (error) {
|
||||||
|
|
||||||
|
}
|
||||||
|
console.log('selectedCalendar', selectedCalendar)
|
||||||
|
|
||||||
|
if (selectedCalendar) {
|
||||||
|
if (selectedCalendar.Role = 'Presidente da República') {
|
||||||
|
let loader = this.toastService.loading();
|
||||||
|
|
||||||
|
const DocumentToSave: EventAttachment[] = this.documents.map((e) => {
|
||||||
|
return {
|
||||||
|
SourceTitle: e.Assunto,
|
||||||
|
ParentId: "AGD_" + this.loggeduser.UserName + "_" + this.processeService.generateInstaceFormatDate(),
|
||||||
|
Source: '1',
|
||||||
|
SourceId: e.Id,
|
||||||
|
ApplicationId: e.ApplicationType.toString(),
|
||||||
|
Id: '',
|
||||||
|
Link: '',
|
||||||
|
SerialNumber: ''
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
let body = this.eventToaproveBody(this.postEvent, CalendarId, this.loggeduser.RoleID, this.loggeduser.UserId, DocumentToSave);
|
||||||
|
await this.processeService.createEventToAprove(this.postEvent.CalendarName, 'pr', body).subscribe((id) => {
|
||||||
|
loader.remove()
|
||||||
|
this.afterSave();
|
||||||
|
this.hhtpErrorHandle.httpsSucessMessagge('new event to aprove')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* DocumentToSave.forEach((attachments, i) => {
|
||||||
|
this.attachmentsService.setEventAttachmentById(attachments).subscribe((res) => {
|
||||||
|
if (DocumentToSave.length == (i + 1)) {
|
||||||
|
this.afterSave();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
if (DocumentToSave.length == 0) {
|
||||||
|
this.afterSave();
|
||||||
|
} */
|
||||||
|
|
||||||
|
}, (error) => {
|
||||||
|
loader.remove()
|
||||||
|
this.showLoader = false
|
||||||
|
this.hhtpErrorHandle.httpStatusHandle(error)
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} else if (selectedCalendar.Role = 'Ministro e Director do Gabinete do PR') {
|
||||||
|
let loader = this.toastService.loading();
|
||||||
|
|
||||||
|
const DocumentToSave: EventAttachment[] = this.documents.map((e) => {
|
||||||
|
return {
|
||||||
|
SourceTitle: e.Assunto,
|
||||||
|
ParentId: "AGD_" + this.loggeduser.UserName + "_" + this.processeService.generateInstaceFormatDate(),
|
||||||
|
Source: '1',
|
||||||
|
SourceId: e.Id,
|
||||||
|
ApplicationId: e.ApplicationType.toString(),
|
||||||
|
Id: '',
|
||||||
|
Link: '',
|
||||||
|
SerialNumber: ''
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
let body = this.eventToaproveBody(this.postEvent, CalendarId, this.loggeduser.RoleID, this.loggeduser.UserId, DocumentToSave);
|
||||||
|
await this.processeService.createEventToAprove(this.postEvent.CalendarName, 'md', body).subscribe((id) => {
|
||||||
|
loader.remove()
|
||||||
|
this.afterSave();
|
||||||
|
this.hhtpErrorHandle.httpsSucessMessagge('new event to aprove')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* DocumentToSave.forEach((attachments, i) => {
|
||||||
|
this.attachmentsService.setEventAttachmentById(attachments).subscribe((res) => {
|
||||||
|
if (DocumentToSave.length == (i + 1)) {
|
||||||
|
this.afterSave();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
if (DocumentToSave.length == 0) {
|
||||||
|
this.afterSave();
|
||||||
|
} */
|
||||||
|
|
||||||
|
}, (error) => {
|
||||||
|
loader.remove()
|
||||||
|
this.showLoader = false
|
||||||
|
this.hhtpErrorHandle.httpStatusHandle(error)
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!selectedCalendar && this.CalendarName == "Meu calendario") {
|
||||||
|
console.log('SG generic')
|
||||||
|
this.postEvent.CalendarName
|
||||||
|
|
||||||
|
const CalendarId = this.selectedCalendarId()
|
||||||
|
let loader = this.toastService.loading();
|
||||||
|
|
||||||
|
this.postEvent.CalendarId = CalendarId
|
||||||
|
|
||||||
|
this.eventService.postEventGeneric(this.postEvent, this.postEvent.CalendarName, CalendarId).subscribe(
|
||||||
|
(id) => {
|
||||||
|
loader.remove();
|
||||||
|
|
||||||
|
const eventId: any = id;
|
||||||
|
|
||||||
|
const DocumentToSave: EventAttachment[] = this.documents.map((e) => {
|
||||||
|
return {
|
||||||
|
SourceTitle: e.Assunto,
|
||||||
|
ParentId: eventId,
|
||||||
|
Source: '1',
|
||||||
|
SourceId: e.Id,
|
||||||
|
ApplicationId: e.ApplicationType.toString(),
|
||||||
|
Id: '',
|
||||||
|
Link: '',
|
||||||
|
SerialNumber: ''
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
DocumentToSave.forEach((attachments, i) => {
|
||||||
|
this.attachmentsService.setEventAttachmentById(attachments).subscribe((res) => {
|
||||||
|
if (DocumentToSave.length == (i + 1)) {
|
||||||
|
this.afterSave();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
if (DocumentToSave.length == 0) {
|
||||||
|
this.afterSave();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.hhtpErrorHandle.httpsSucessMessagge('new event')
|
||||||
|
let data = {
|
||||||
|
"subject": this.postEvent.Subject,
|
||||||
|
"start": this.postEvent.StartDate,
|
||||||
|
"end": this.postEvent.EndDate,
|
||||||
|
"venue": this.postEvent.Location,
|
||||||
|
"id": id,
|
||||||
|
"calendarId": CalendarId
|
||||||
|
}
|
||||||
|
if (this.roomId) {
|
||||||
|
this.chatMethodService.sendMessage(this.roomId, data);
|
||||||
|
}
|
||||||
|
}, (error) => {
|
||||||
|
|
||||||
|
loader.remove()
|
||||||
|
this.showLoader = false
|
||||||
|
this.hhtpErrorHandle.httpStatusHandle(error)
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
this.postEvent.CalendarName
|
this.postEvent.CalendarName
|
||||||
@@ -771,5 +959,31 @@ export class NewEventPage implements OnInit {
|
|||||||
window['temp.path:/home/agenda/new-event.component.ts'] = {}
|
window['temp.path:/home/agenda/new-event.component.ts'] = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
eventToaproveBody(event, calendarId, role, userId, attachments) {
|
||||||
|
let toAproveObject = {
|
||||||
|
"EventProcess": {
|
||||||
|
"Body": event.Body,
|
||||||
|
"Location": event.Location,
|
||||||
|
"Subject": event.Subject,
|
||||||
|
"StartDate": event.StartDate,
|
||||||
|
"EndDate": event.EndDate,
|
||||||
|
"Status": "Active",
|
||||||
|
"IsAllDayEvent": event.IsRecurring,
|
||||||
|
"EventType": event.EventType,
|
||||||
|
"ParticipantsList": event.Attendees,
|
||||||
|
"EventRecurrence": event.EventRecurrence,
|
||||||
|
"HasAttachments": event.HasAttachments,
|
||||||
|
"CalendarId": calendarId,
|
||||||
|
"Role": role,
|
||||||
|
"wxUserID": userId,
|
||||||
|
"TimeZone": "W. Central Africa Standard Time"
|
||||||
|
},
|
||||||
|
"Attachments": attachments,
|
||||||
|
"InstanceID": "AGD_" + this.loggeduser.UserName + "_" + this.processeService.generateInstaceFormatDate()
|
||||||
|
}
|
||||||
|
|
||||||
|
return toAproveObject;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -907,13 +907,26 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
|||||||
const encodedData = btoa(JSON.stringify(await this.getBase64(file).catch ((error) => {
|
const encodedData = btoa(JSON.stringify(await this.getBase64(file).catch ((error) => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
})));
|
})));
|
||||||
const blob = this.fileService.base64toBlob(encodedData, file.type)
|
let blob;
|
||||||
|
let formData
|
||||||
|
let fileBase64
|
||||||
|
if (this.platform.is("tablet")) {
|
||||||
|
|
||||||
|
blob = this.fileService.base64toBlob(encodedData, file.type)
|
||||||
|
console.log('BLOB BLOB', blob)
|
||||||
|
|
||||||
const fileBase64 = await this._getBase64(file)
|
formData = new FormData();
|
||||||
|
|
||||||
const formData = new FormData();
|
|
||||||
formData.append('blobFile', blob);
|
formData.append('blobFile', blob);
|
||||||
|
/* console.log('add file', fileBase64) */
|
||||||
|
|
||||||
|
} else {
|
||||||
|
blob = this.fileService.base64toBlob(encodedData, file.type)
|
||||||
|
|
||||||
|
fileBase64 = await this._getBase64(file)
|
||||||
|
|
||||||
|
formData = new FormData();
|
||||||
|
formData.append('blobFile', blob);
|
||||||
|
}
|
||||||
|
|
||||||
this.ChatSystemService.getGroupRoom(roomId).send({
|
this.ChatSystemService.getGroupRoom(roomId).send({
|
||||||
file: {
|
file: {
|
||||||
|
|||||||
@@ -827,9 +827,11 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
|||||||
|
|
||||||
async addFileToChat(types: typeof FileType[]) {
|
async addFileToChat(types: typeof FileType[]) {
|
||||||
|
|
||||||
|
|
||||||
const roomId = this.roomId
|
const roomId = this.roomId
|
||||||
|
|
||||||
const file: any = await this.fileService.getFileFromDevice(types);
|
const file: any = await this.fileService.getFileFromDevice(types);
|
||||||
|
console.log(file.type)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -838,12 +840,29 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
|||||||
const encodedData = btoa(JSON.stringify(await this.getBase64(file).catch((error) => {
|
const encodedData = btoa(JSON.stringify(await this.getBase64(file).catch((error) => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
})));
|
})));
|
||||||
const blob = this.fileService.base64toBlob(encodedData, file.type)
|
|
||||||
|
|
||||||
const fileBase64 = await this._getBase64(file)
|
let blob;
|
||||||
|
let formData
|
||||||
|
let fileBase64
|
||||||
|
if (this.platform.is("tablet")) {
|
||||||
|
|
||||||
const formData = new FormData();
|
blob = this.fileService.base64toBlob(encodedData, file.type)
|
||||||
|
console.log('BLOB BLOB', blob)
|
||||||
|
|
||||||
|
formData = new FormData();
|
||||||
formData.append('blobFile', blob);
|
formData.append('blobFile', blob);
|
||||||
|
/* console.log('add file', fileBase64) */
|
||||||
|
|
||||||
|
} else {
|
||||||
|
blob = this.fileService.base64toBlob(encodedData, file.type)
|
||||||
|
|
||||||
|
fileBase64 = await this._getBase64(file)
|
||||||
|
|
||||||
|
formData = new FormData();
|
||||||
|
formData.append('blobFile', blob);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.ChatSystemService.getDmRoom(roomId).send({
|
this.ChatSystemService.getDmRoom(roomId).send({
|
||||||
|
|||||||
@@ -226,7 +226,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<div *ngIf="profilePicture != ''" class="profile-image">
|
<div *ngIf="profilePicture != ''" class="profile-image">
|
||||||
<img class="profile-image" src={{profilePicture}}>
|
<img class="profile-image font-45-em" src={{profilePicture}}>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="profile-text">
|
<div class="profile-text">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@import '~src/function.scss';
|
@import "~src/function.scss";
|
||||||
|
|
||||||
.div-top-header {
|
.div-top-header {
|
||||||
margin: 0 em(20);
|
margin: 0 em(20);
|
||||||
@@ -7,13 +7,13 @@
|
|||||||
border: 0 !important;
|
border: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.profile-image {
|
.profile-image {
|
||||||
border-radius: 80%; /* Tornar a imagem circular */
|
vertical-align: middle;
|
||||||
width: 100%;
|
width: 40px;
|
||||||
height: 25.33%;
|
height: 40px;
|
||||||
overflow: auto;
|
border-radius: 50%;
|
||||||
|
display: block; /* Torna a imagem um elemento de bloco */
|
||||||
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.div-logo {
|
.div-logo {
|
||||||
@@ -77,7 +77,6 @@
|
|||||||
.add-botton-border-white {
|
.add-botton-border-white {
|
||||||
border-bottom: 1px solid #fff;
|
border-bottom: 1px solid #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -87,12 +86,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.div-profile {
|
.div-profile {
|
||||||
height: fit-content;
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
text-align: center;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
overflow: auto;
|
|
||||||
display: flex !important;
|
display: flex !important;
|
||||||
justify-content: end;
|
justify-content:space-around;
|
||||||
max-width: 45px;
|
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
@@ -130,14 +129,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (min-width: 1366px) {
|
@media only screen and (min-width: 1366px) {
|
||||||
|
|
||||||
.mobile {
|
.mobile {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
.desktop {
|
.desktop {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab {
|
.tab {
|
||||||
@@ -156,7 +153,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.search-input-container {
|
.search-input-container {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
border-radius: 27.5px;
|
border-radius: 27.5px;
|
||||||
@@ -178,7 +174,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.tab {
|
.tab {
|
||||||
color: var(--header-tab-text-white);
|
color: var(--header-tab-text-white);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
<div class="buttons width-100">
|
<div class="buttons width-100">
|
||||||
<button (click)="openAddNoteModal('Arquivo')" class="btn-cancel" shape="round" >Arquivar</button>
|
<button (click)="openAddNoteModal('Arquivo')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="buttons width-100" *ngIf="task.activityInstanceName != 'Revisar Diploma'">
|
<div class="buttons width-100" *ngIf="task.activityInstanceName != 'Assinar Diploma'">
|
||||||
<button (click)="openExpedientActionsModal('0',task)" class="btn-cancel" shape="round" >Efetuar despacho</button>
|
<button (click)="openExpedientActionsModal('0',task)" class="btn-cancel" shape="round" >Efetuar despacho</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ export class DiplomaOptionsPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
console.log(this.task.activityInstanceName)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
export let versionData = {
|
export let versionData = {
|
||||||
"shortSHA": "90e01839b",
|
"shortSHA": "9de301944",
|
||||||
"SHA": "90e01839b7f38ed5a568a0e24fa0970836a1ce2b",
|
"SHA": "9de30194464b9511a9aa14a85b5b60894aeb860b",
|
||||||
"branch": "developer-prod",
|
"branch": "developer-prod",
|
||||||
"lastCommitAuthor": "'Eudes Inácio'",
|
"lastCommitAuthor": "'Eudes Inácio'",
|
||||||
"lastCommitTime": "'Thu Aug 31 16:39:13 2023 +0100'",
|
"lastCommitTime": "'Thu Aug 31 17:35:39 2023 +0100'",
|
||||||
"lastCommitMessage": "time picker of create secret grupo remove 0 minutes",
|
"lastCommitMessage": "new erro hendle",
|
||||||
"lastCommitNumber": "5255",
|
"lastCommitNumber": "5256",
|
||||||
"change": "",
|
"change": "",
|
||||||
"changeStatus": "On branch developer-prod\nYour branch is ahead of 'origin/developer-prod' by 1 commit.\n (use \"git push\" to publish your local commits)\n\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/services/http-error-handle.service.ts",
|
"changeStatus": "On branch developer-prod\nYour branch is ahead of 'origin/developer-prod' by 2 commits.\n (use \"git push\" to publish your local commits)\n\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/Rules/despacho.service.ts\n\tmodified: src/app/modals/create-process/create-process.page.html\n\tmodified: src/app/modals/create-process/create-process.page.ts\n\tnew file: src/app/models/eventToAprove.model.ts\n\tmodified: src/app/models/user.model.ts\n\tmodified: src/app/pages/agenda/edit-event/edit-event.page.ts\n\tmodified: src/app/pages/agenda/new-event/new-event.page.ts\n\tmodified: src/app/pages/events/events.page.html\n\tmodified: src/app/pages/gabinete-digital/diplomas-assinar/diploma-assinar/diploma-assinar.page.html\n\tmodified: src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.html\n\tmodified: src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.ts\n\tmodified: src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts\n\tmodified: src/app/services/auth.service.ts\n\tmodified: src/app/services/http-error-handle.service.ts\n\tmodified: src/app/services/processes.service.ts\n\tmodified: src/app/shared/agenda/approve-event/approve-event.page.ts\n\tmodified: src/app/shared/agenda/edit-event/edit-event.page.ts\n\tmodified: src/app/shared/agenda/new-event/new-event.page.ts\n\tmodified: src/app/shared/chat/group-messages/group-messages.page.ts\n\tmodified: src/app/shared/chat/messages/messages.page.ts\n\tmodified: src/app/shared/header/header.page.html\n\tmodified: src/app/shared/header/header.page.scss\n\tmodified: src/app/shared/popover/deploma-options/deploma-options.page.html\n\tmodified: src/app/shared/popover/deploma-options/deploma-options.page.ts",
|
||||||
"changeAuthor": "eudes.inacio"
|
"changeAuthor": "eudes.inacio"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user