mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
merge
This commit is contained in:
@@ -228,6 +228,7 @@
|
||||
<!-- {{year.yearInfo.yearName}} -->
|
||||
<div *ngFor="let month of year.months " class="header-day" >
|
||||
<!-- {{ month.monthInfo.monthName | json }} -->
|
||||
<!-- <hr> -->
|
||||
|
||||
<div *ngFor="let day of month.days " class="EventListBox-container" >
|
||||
|
||||
@@ -237,7 +238,7 @@
|
||||
|
||||
<div *ngFor="let event of day.events " class="EventListBox mb-10" >
|
||||
<div class="d-flex content-{{event.profile}}-{{event.event.CalendarName}} mt-10 cursor-pointer width-100 " (click)="eventClicked(event)"
|
||||
*ngIf="viewEventMonth <= dateMonth(event) ">
|
||||
>
|
||||
|
||||
<div class="schedule-time" *ngIf="!event.event.IsAllDayEvent">
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
selectedEvent: Event;
|
||||
selectedEventId: string | number;
|
||||
selectedEventCalendarId : string | number;
|
||||
selectedEventCalendarId: string | number;
|
||||
postEvent: any;
|
||||
|
||||
// temporary data
|
||||
@@ -213,7 +213,7 @@ export class AgendaPage implements OnInit {
|
||||
} else if (this.loggeduser.Profile == 'PR') {
|
||||
this.profile = "pr";
|
||||
} else {
|
||||
if(this.eventService.usersCalendarIds.length >= 2) {
|
||||
if (this.eventService.usersCalendarIds.length >= 2) {
|
||||
this.profile = "mdgpr";
|
||||
} else if (this.eventService.hasOwnCalendar) {
|
||||
this.profile = "mdgpr";
|
||||
@@ -309,8 +309,8 @@ export class AgendaPage implements OnInit {
|
||||
let weekNum = 0;
|
||||
|
||||
function Week(a) {
|
||||
for(let b of a.querySelectorAll('td')) {
|
||||
if(!b.className.includes('text-muted')) {
|
||||
for (let b of a.querySelectorAll('td')) {
|
||||
if (!b.className.includes('text-muted')) {
|
||||
weekNum++;
|
||||
return true
|
||||
}
|
||||
@@ -320,18 +320,18 @@ export class AgendaPage implements OnInit {
|
||||
const dayBoxHeight = document.querySelector('.monthview-container .swiper-container .swiper-slide-active table tbody tr td').clientHeight
|
||||
const weeks = document.querySelectorAll('.monthview-container .swiper-container .swiper-slide-active table tbody tr');
|
||||
|
||||
for (let week of weeks as any ){
|
||||
for (let week of weeks as any) {
|
||||
Week(week)
|
||||
}
|
||||
|
||||
this.showCalendar = true
|
||||
this.listBoxService.height = (weekNum * dayBoxHeight) +'px'
|
||||
this.listBoxService.height = (weekNum * dayBoxHeight) + 'px'
|
||||
|
||||
if(dayBoxHeight == 0) {
|
||||
if (dayBoxHeight == 0) {
|
||||
this.weekToShow()
|
||||
}
|
||||
} catch (e) {
|
||||
setTimeout(()=> {
|
||||
setTimeout(() => {
|
||||
this.weekToShow()
|
||||
}, 100)
|
||||
}
|
||||
@@ -339,8 +339,8 @@ export class AgendaPage implements OnInit {
|
||||
}
|
||||
|
||||
setCalendarByDefault() {
|
||||
if(!this.CalendarName) {
|
||||
if(this.eventService.calendarNamesAry.includes('Meu calendario')) {
|
||||
if (!this.CalendarName) {
|
||||
if (this.eventService.calendarNamesAry.includes('Meu calendario')) {
|
||||
this.CalendarName = 'Meu calendario';
|
||||
} else {
|
||||
this.CalendarName = this.eventService.calendarNamesAry[0]
|
||||
@@ -421,13 +421,16 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
onDropDownScrollWeal() {
|
||||
|
||||
setTimeout(() => {
|
||||
document.querySelector('.dropdown-scroll-weel').querySelectorAll('.active')[0].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
try {
|
||||
setTimeout(() => {
|
||||
document.querySelector('.dropdown-scroll-weel').querySelectorAll('.active')[1].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
}, 300)
|
||||
}, 10)
|
||||
|
||||
document.querySelector('.dropdown-scroll-weel').querySelectorAll('.active')[0].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
setTimeout(() => {
|
||||
document.querySelector('.dropdown-scroll-weel').querySelectorAll('.active')[1].scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
}, 300)
|
||||
}, 10)
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -445,7 +448,7 @@ export class AgendaPage implements OnInit {
|
||||
this.rangeStartDate = ev.startTime;
|
||||
this.rangeEndDate = ev.endTime;
|
||||
|
||||
if(this.currentMoth.rangeEndDate == null) {
|
||||
if (this.currentMoth.rangeEndDate == null) {
|
||||
this.currentMoth = {
|
||||
rangeStartDate: ev.startTime,
|
||||
rangeEndDate: ev.endTime
|
||||
@@ -579,7 +582,7 @@ export class AgendaPage implements OnInit {
|
||||
loadRangeEvents(startTime: Date, endTime: Date) {
|
||||
this.weekToShow()
|
||||
|
||||
if(!this.eventService.hasAnyCalendar) {
|
||||
if (!this.eventService.hasAnyCalendar) {
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -589,9 +592,9 @@ export class AgendaPage implements OnInit {
|
||||
this.showLoader = true;
|
||||
|
||||
const index = `${startTime}${endTime}`
|
||||
if(!this.loadRequest[index]) {
|
||||
this.loadRequest[index] = {startTime, endTime}
|
||||
this.loadRequestHistory[index] = {lastTimeUpdate: new Date()}
|
||||
if (!this.loadRequest[index]) {
|
||||
this.loadRequest[index] = { startTime, endTime }
|
||||
this.loadRequestHistory[index] = { lastTimeUpdate: new Date() }
|
||||
|
||||
this.loadRangeEventRun(startTime, endTime)
|
||||
} else {
|
||||
@@ -606,7 +609,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
loadRangeEventRun(startTime: Date, endTime: Date) {
|
||||
|
||||
if(SessionStore.user.OwnerCalendars.length == 0 && SessionStore.user.SharedCalendars.length == 0) {
|
||||
if (SessionStore.user.OwnerCalendars.length == 0 && SessionStore.user.SharedCalendars.length == 0) {
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -628,16 +631,16 @@ export class AgendaPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
let load = 0;
|
||||
let load = 0;
|
||||
|
||||
for ( const selectedCalendar of selectedCalendarIds) {
|
||||
for (const selectedCalendar of selectedCalendarIds) {
|
||||
this.eventService.getEventsByCalendarId(momentG(new Date(startTime), 'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime), 'yyyy-MM-dd 23:59:59'), selectedCalendar.CalendarId).then((response: any) => {
|
||||
|
||||
let label;
|
||||
|
||||
if(SessionStore.user.Profile == 'PR') {
|
||||
if (SessionStore.user.Profile == 'PR') {
|
||||
label = "pr"
|
||||
} else if(SessionStore.user.OwnerCalendars.find(e => e.CalendarId == selectedCalendar.CalendarId)) {
|
||||
} else if (SessionStore.user.OwnerCalendars.find(e => e.CalendarId == selectedCalendar.CalendarId)) {
|
||||
label = 'md'
|
||||
} else {
|
||||
label = "pr"
|
||||
@@ -656,7 +659,7 @@ export class AgendaPage implements OnInit {
|
||||
this.deleteLoadRangeEvent(startTime, endTime);
|
||||
|
||||
load++
|
||||
if(load == selectedCalendarIds.length) {
|
||||
if (load == selectedCalendarIds.length) {
|
||||
this.showLoader = false;
|
||||
}
|
||||
|
||||
@@ -669,9 +672,9 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
selectedAgenda = {}
|
||||
|
||||
getSelectedAgendaCalendars () {
|
||||
getSelectedAgendaCalendars() {
|
||||
|
||||
if(this.CalendarName == 'PR+MDGPR') {
|
||||
if (this.CalendarName == 'PR+MDGPR') {
|
||||
|
||||
let result = this.SessionStore.user.OwnerCalendars
|
||||
|
||||
@@ -682,46 +685,46 @@ export class AgendaPage implements OnInit {
|
||||
return result.concat(join)
|
||||
} else {
|
||||
|
||||
const calendar = this.eventService.calendarNamesType[this.CalendarName];
|
||||
let Oficial = calendar?.['OficialId']
|
||||
let Pessoal = calendar?.['PessoalId']
|
||||
const calendar = this.eventService.calendarNamesType[this.CalendarName];
|
||||
let Oficial = calendar?.['OficialId']
|
||||
let Pessoal = calendar?.['PessoalId']
|
||||
|
||||
if(Oficial && Pessoal) {
|
||||
if (Oficial && Pessoal) {
|
||||
|
||||
return [
|
||||
{
|
||||
CalendarId : Oficial,
|
||||
OwnerId: calendar.OwnerId,
|
||||
CalendarName: calendar.CalendarName
|
||||
},
|
||||
{
|
||||
OwnerId: calendar.OwnerId,
|
||||
CalendarId : Pessoal,
|
||||
CalendarName: calendar.CalendarName
|
||||
return [
|
||||
{
|
||||
CalendarId: Oficial,
|
||||
OwnerId: calendar.OwnerId,
|
||||
CalendarName: calendar.CalendarName
|
||||
},
|
||||
{
|
||||
OwnerId: calendar.OwnerId,
|
||||
CalendarId: Pessoal,
|
||||
CalendarName: calendar.CalendarName
|
||||
}
|
||||
]
|
||||
|
||||
} else if (Oficial) {
|
||||
try {
|
||||
return [{
|
||||
OwnerId: calendar.OwnerId,
|
||||
CalendarId: Oficial,
|
||||
CalendarName: calendar.CalendarName
|
||||
}]
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
return [{
|
||||
OwnerId: calendar.OwnerId,
|
||||
CalendarId: Pessoal,
|
||||
CalendarName: calendar.CalendarName
|
||||
}]
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
]
|
||||
|
||||
} else if (Oficial) {
|
||||
try {
|
||||
return [{
|
||||
OwnerId: calendar.OwnerId,
|
||||
CalendarId : Oficial,
|
||||
CalendarName: calendar.CalendarName
|
||||
}]
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
return [{
|
||||
OwnerId: calendar.OwnerId,
|
||||
CalendarId : Pessoal,
|
||||
CalendarName: calendar.CalendarName
|
||||
}]
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -781,7 +784,7 @@ export class AgendaPage implements OnInit {
|
||||
} catch (e) { }
|
||||
|
||||
this.updateEventListBox()
|
||||
} else {}
|
||||
} else { }
|
||||
|
||||
}
|
||||
|
||||
@@ -920,7 +923,7 @@ export class AgendaPage implements OnInit {
|
||||
this.myCal.loadEvents();
|
||||
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||
}
|
||||
} catch (error) {
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
|
||||
@@ -935,7 +938,7 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
let navigationExtras: NavigationExtras = { queryParams: { CalendarId } }
|
||||
|
||||
this.router.navigate(['/home/agenda/',eventId,'agenda'], navigationExtras);
|
||||
this.router.navigate(['/home/agenda/', eventId, 'agenda'], navigationExtras);
|
||||
|
||||
}
|
||||
|
||||
@@ -950,13 +953,13 @@ export class AgendaPage implements OnInit {
|
||||
this.postEvent = data.event;
|
||||
|
||||
this.mobileComponent.showEditEvent = true;
|
||||
} else if(data.type == 'delete') {
|
||||
} else if (data.type == 'delete') {
|
||||
|
||||
}
|
||||
|
||||
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||
|
||||
setTimeout(()=>{
|
||||
setTimeout(() => {
|
||||
this.onCurrentChanged(this.eventSelectedDate)
|
||||
}, 500)
|
||||
|
||||
@@ -1185,10 +1188,10 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
function endOfMonth(myDate){
|
||||
function endOfMonth(myDate) {
|
||||
let date = new Date(myDate);
|
||||
date.setDate(1); // Avoids edge cases on the 31st day of some months
|
||||
date.setMonth(date.getMonth() +1);
|
||||
date.setMonth(date.getMonth() + 1);
|
||||
date.setDate(0);
|
||||
date.setHours(23);
|
||||
date.setMinutes(59);
|
||||
|
||||
@@ -22,6 +22,7 @@ import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { TaskService } from 'src/app/services/task.service'
|
||||
import { ContactsService } from 'src/app/services/contacts.service';
|
||||
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
parse: {
|
||||
@@ -93,6 +94,9 @@ export class NewEventPage implements OnInit {
|
||||
roomId: string;
|
||||
globalEnd = new Date('1999')
|
||||
environment = environment
|
||||
eventPersons: EventPerson[];
|
||||
contacts: EventPerson[];
|
||||
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
@@ -105,7 +109,8 @@ export class NewEventPage implements OnInit {
|
||||
private chatMethodService: ChatMethodsService,
|
||||
private hhtpErrorHandle: HttpErrorHandle,
|
||||
private processeService: ProcessesService,
|
||||
public TaskService: TaskService
|
||||
public TaskService: TaskService,
|
||||
private contactsService: ContactsService,
|
||||
) {
|
||||
this.loggeduser = SessionStore.user;
|
||||
this.postEvent = new Event();
|
||||
@@ -196,6 +201,7 @@ export class NewEventPage implements OnInit {
|
||||
this.checkRoleInArray()
|
||||
this.changeAgenda()
|
||||
|
||||
this.fetchContacts("")
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
@@ -831,4 +837,33 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
return toAproveObject;
|
||||
}
|
||||
|
||||
async fetchContacts(filter: string) {
|
||||
|
||||
if (this.loggeduser.Profile == 'PR') {
|
||||
this.contactsService.getContacts(filter).subscribe(result => {
|
||||
if (this.eventPersons != null) {
|
||||
this.eventPersons.forEach(attendee => {
|
||||
const index: number = result.findIndex((cont) => {
|
||||
return cont.EmailAddress.toLocaleLowerCase() == attendee.EmailAddress.toLocaleLowerCase()
|
||||
});
|
||||
|
||||
result.splice(index, 1);
|
||||
|
||||
});
|
||||
}
|
||||
this.contacts = result;
|
||||
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)
|
||||
|
||||
this.contacts = filterLoggedUserEmail;
|
||||
const newAttendees: EventPerson[] = this.contacts;
|
||||
|
||||
this.setIntervenient(newAttendees);
|
||||
console.log('Attendes Email', this.contacts)
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
</div>
|
||||
<div class="buttons px-20" *ngIf="task.activityInstanceName == 'Concluir Despacho'">
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openAddNoteModal('Concluido')" class="btn-cancel" shape="round" >Marcar como Concluído</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openAddNoteModal('Reexecução')" class="btn-cancel" shape="round" >Enviar para Reexecução</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openAddNoteModal('Reexecutar')" class="btn-cancel" shape="round" >Enviar para Reexecução</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks]) && task.Status != 'Pending'" (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
</div>
|
||||
|
||||
@@ -328,7 +328,7 @@ export class DespachoPrPage implements OnInit {
|
||||
async reexecutar(note: string, documents: any) {
|
||||
let body = {
|
||||
"serialNumber": this.serialNumber,
|
||||
"action": "Reexecução",
|
||||
"action": "Reexecutar",
|
||||
"ActionTypeId": 100000010,
|
||||
"dataFields": {
|
||||
"ReviewUserComment": note,
|
||||
@@ -416,7 +416,7 @@ export class DespachoPrPage implements OnInit {
|
||||
// console.log('actionName', actionName)
|
||||
await this.concluir(res.data.note, docs);
|
||||
}
|
||||
else if (actionName == 'Reexecução') {
|
||||
else if (actionName == 'Reexecutar') {
|
||||
await this.reexecutar(res.data.note, docs);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@
|
||||
<div class="solid"></div>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<button class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<button class="btn-cancel" shape="round" (click)="openAddNoteModal('Arquivo')">Arquivar</button>
|
||||
<!-- <div class="solid"></div> -->
|
||||
</div>
|
||||
<div class="buttons">
|
||||
|
||||
+6
-3
@@ -39,6 +39,7 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
customDate: any;
|
||||
caller: string;
|
||||
mergedArray: any = [];
|
||||
draftArray: any = [];
|
||||
DraftIds = ""
|
||||
DraftNames = ""
|
||||
asDraft = true;
|
||||
@@ -492,6 +493,7 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
"ownerId": resd.data.ownerId,
|
||||
"status": resd.data.status,
|
||||
};
|
||||
this.draftArray.push(object);
|
||||
this.mergedArray.push(object);
|
||||
this.DraftNames += resd.data.description + ";";
|
||||
this.DraftIds += resd.data.id + ";";
|
||||
@@ -502,13 +504,14 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
});
|
||||
|
||||
await Promise.all(draftPromises);
|
||||
if (this.draftArray.length == 0) {
|
||||
console.log('No draft found.');
|
||||
this.asDraft = false
|
||||
}
|
||||
|
||||
if (this.DraftNames) {
|
||||
this.DraftNames = this.DraftNames.slice(0, -1);
|
||||
this.DraftIds = this.DraftIds.slice(0, -1);
|
||||
} else {
|
||||
console.log('No draft found.');
|
||||
this.asDraft = false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -294,7 +294,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="sessionStore.user.Profile != 'PR'" class="aside-righ flex-grow-1">
|
||||
<div class="aside-righ flex-grow-1">
|
||||
<app-empty-container
|
||||
[texto]="emptyTextDescription"
|
||||
*ngIf="!showAttendees"
|
||||
|
||||
+43
-7
@@ -23,6 +23,7 @@ import { RoleIdService } from 'src/app/services/role-id.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { TaskService } from 'src/app/services/task.service'
|
||||
import { ContactsService } from 'src/app/services/contacts.service';
|
||||
|
||||
const moment = _rollupMoment || _moment;
|
||||
|
||||
@@ -114,6 +115,9 @@ export class BookMeetingModalPage implements OnInit {
|
||||
|
||||
sessionStore = SessionStore;
|
||||
environment = environment
|
||||
loggeduser: LoginUserRespose;
|
||||
eventPersons: EventPerson[];
|
||||
contacts: EventPerson[];
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
@@ -125,7 +129,8 @@ export class BookMeetingModalPage implements OnInit {
|
||||
public eventService: EventsService,
|
||||
public RoleIdService: RoleIdService,
|
||||
private httpErroHandle: HttpErrorHandle,
|
||||
public TaskService: TaskService
|
||||
public TaskService: TaskService,
|
||||
private contactsService: ContactsService,
|
||||
|
||||
|
||||
) {
|
||||
@@ -136,7 +141,7 @@ export class BookMeetingModalPage implements OnInit {
|
||||
|
||||
console.log('fulltask', this.fulltask)
|
||||
|
||||
if(this.fulltask?.Documents) {
|
||||
if (this.fulltask?.Documents) {
|
||||
this.documents = this.fulltask.Documents
|
||||
}
|
||||
|
||||
@@ -174,6 +179,7 @@ export class BookMeetingModalPage implements OnInit {
|
||||
}
|
||||
|
||||
this.changeAgenda();
|
||||
this.loggeduser = SessionStore.user;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -182,6 +188,7 @@ export class BookMeetingModalPage implements OnInit {
|
||||
this.getAttachments();
|
||||
this.setDefaultTime()
|
||||
this.getRecurrenceTypes();
|
||||
this.fetchContacts("")
|
||||
|
||||
}
|
||||
|
||||
@@ -191,8 +198,8 @@ export class BookMeetingModalPage implements OnInit {
|
||||
}
|
||||
|
||||
myInterval = setInterval(() => {
|
||||
document.querySelectorAll('.ngx-mat-timepicker input').forEach((e :any) => {
|
||||
if(e) {
|
||||
document.querySelectorAll('.ngx-mat-timepicker input').forEach((e: any) => {
|
||||
if (e) {
|
||||
e.disabled = true;
|
||||
}
|
||||
})
|
||||
@@ -327,8 +334,8 @@ export class BookMeetingModalPage implements OnInit {
|
||||
return {
|
||||
ApplicationId: e.ApplicationType || e.ApplicationId,
|
||||
Source: 1,
|
||||
SourceId: e.Id || e.DocId || e.SourceId,
|
||||
SourceName:e.Assunto,
|
||||
SourceId: e.Id || e.DocId || e.SourceId,
|
||||
SourceName: e.Assunto,
|
||||
Description: e.Assunto,
|
||||
Stakeholders: e.EntidadeOrganicaNome
|
||||
}
|
||||
@@ -417,7 +424,7 @@ export class BookMeetingModalPage implements OnInit {
|
||||
|
||||
|
||||
modal.onDidDismiss().then((data) => {
|
||||
|
||||
console.log('attenes return', data)
|
||||
if (data) {
|
||||
data = data['data'];
|
||||
|
||||
@@ -587,4 +594,33 @@ export class BookMeetingModalPage implements OnInit {
|
||||
this.postData.EndDate = this.postData.StartDate;
|
||||
}
|
||||
|
||||
async fetchContacts(filter: string) {
|
||||
console.log(this.loggeduser)
|
||||
if (this.loggeduser.Profile == 'PR') {
|
||||
this.contactsService.getContacts(filter).subscribe(result => {
|
||||
if (this.eventPersons != null) {
|
||||
this.eventPersons.forEach(attendee => {
|
||||
const index: number = result.findIndex((cont) => {
|
||||
return cont.EmailAddress.toLocaleLowerCase() == attendee.EmailAddress.toLocaleLowerCase()
|
||||
});
|
||||
|
||||
result.splice(index, 1);
|
||||
|
||||
});
|
||||
}
|
||||
this.contacts = result;
|
||||
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)
|
||||
|
||||
this.contacts = filterLoggedUserEmail;
|
||||
const newAttendees: EventPerson[] = this.contacts;
|
||||
|
||||
this.setIntervenient(newAttendees);
|
||||
console.log('Attendes Email', this.contacts)
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -97,7 +97,7 @@
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('selectedTypes')?.invalid && validateFrom ">
|
||||
<div class="ion-input-class" [class.input-error]="Form?.get('selectedTypes')?.invalid && validateFrom || validateField ">
|
||||
<!-- <ion-item
|
||||
class="ion-no-border ion-no-padding ion-no-margin d-block d-md-none">
|
||||
<ion-select
|
||||
@@ -112,7 +112,7 @@
|
||||
appearance="fill"
|
||||
class="width-100 d-block"
|
||||
appearance="none">
|
||||
<mat-select [(ngModel)]="selectedTypes" multiple placeholder="Selecione o tipo de assunto*">
|
||||
<mat-select [multiple]="false" [(ngModel)]="selectedTypes" placeholder="{{placeholderSubject}}">
|
||||
<mat-option *ngFor="let type of subjectTypes" value="{{type.Code}}">{{type.Description}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
+26
-14
@@ -69,7 +69,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
loadedAttachments:any;
|
||||
documents:SearchList[] = [];
|
||||
|
||||
subjectTypes:any[] = [];
|
||||
subjectTypes:any;
|
||||
selectedTypes: string[]=[];
|
||||
SearchFolder: any = []
|
||||
|
||||
@@ -96,6 +96,7 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
validateFrom = false;
|
||||
validateField = false;
|
||||
document: any
|
||||
placeholderSubject: string;
|
||||
|
||||
get toppingsValues() {
|
||||
return this.toppings.value;
|
||||
@@ -150,7 +151,12 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
// console.log('this.document', this.document)
|
||||
|
||||
|
||||
this.selectedTypes = ['99999850'];
|
||||
if(this.loggeduser.Profile == 'PR') {
|
||||
this.selectedTypes = ['99999850'];
|
||||
this.placeholderSubject = 'Indefinido'
|
||||
} else {
|
||||
this.placeholderSubject = 'Selecione o tipo de assunto*'
|
||||
}
|
||||
|
||||
this.postData = new Despacho();
|
||||
this.participants = this.participants = new Array();
|
||||
@@ -454,21 +460,27 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
if(this.postData.DispatchFolder.Message){
|
||||
try {
|
||||
this.taskResult = await this.despachoService.createDespacho(this.postData).toPromise();
|
||||
await this.httpErroHandle.httpsSucessMessagge('Efetuar Despacho')
|
||||
this.modalController.dismiss(action_despacho_pr);
|
||||
} catch (error) {
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
//loader.remove()
|
||||
}
|
||||
}
|
||||
/* if(this.postData.DispatchFolder.Message){
|
||||
if(this.selectedTypes.length > 0) { */
|
||||
try {
|
||||
this.taskResult = await this.despachoService.createDespacho(this.postData).toPromise();
|
||||
await this.httpErroHandle.httpsSucessMessagge('Efetuar Despacho')
|
||||
this.modalController.dismiss(action_despacho_pr);
|
||||
} catch (error) {
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
//loader.remove()
|
||||
}
|
||||
/* } else {
|
||||
this.validateField = true;
|
||||
this.toastService._badRequest('Por favor selecione um assunto');
|
||||
} */
|
||||
|
||||
/* }
|
||||
else{
|
||||
this.validateField = true;
|
||||
this.toastService._badRequest('Por favor adicione uma descrição');
|
||||
}
|
||||
} */
|
||||
loader.remove();
|
||||
break;
|
||||
|
||||
|
||||
@@ -112,8 +112,15 @@ export class LoginPage implements OnInit {
|
||||
if (this.validateUsername()) {
|
||||
if (this.validatePassword()) {
|
||||
|
||||
let newUserName = ""
|
||||
if (this.usernameAsDomain(environment.domain, this.username.trim())) {
|
||||
newUserName = this.username.trim();
|
||||
} else {
|
||||
newUserName = this.username.trim() + "@" + environment.domain;
|
||||
}
|
||||
|
||||
this.userattempt = {
|
||||
username: this.username.trim(),
|
||||
username: newUserName.trim(),
|
||||
password: this.password.trim(),
|
||||
domainName: environment.domain,
|
||||
BasicAuthKey: ""
|
||||
@@ -233,4 +240,8 @@ export class LoginPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
usernameAsDomain(substring, mainString) {
|
||||
return mainString.includes(substring);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user