lot of changes

This commit is contained in:
Eudes Inácio
2024-06-02 13:53:46 +01:00
parent 599d278e57
commit e9c8e0fbd9
19 changed files with 428 additions and 264 deletions
+17 -3
View File
@@ -10,9 +10,23 @@ export class SearchList {
ApplicationName: string;
}
export class SearchList_v2 {
docId: number;
sourceName: string;
description: string;
applicationId: number;
classificator: string;
dateEntry: string;
docNumber: string;
subject: string;
userId: number
}
export class Attachments {
Id?: number
ParentId?:any
ParentId?: any
Source: number
SourceId: any
SourceName: any
@@ -36,7 +50,7 @@ export class SearchDocumentDetails {
export class SearchFolderDetails {
ApplicationID: number
ApplicationId: number
Assunto:string
Assunto: string
DateDispatch: string
DispatchNumber: string
Docs: string
@@ -44,7 +58,7 @@ export class SearchFolderDetails {
DocumentsTotal: 2
IntervenerList: string[]
Interveners: string
Nature:string
Nature: string
Sender: null | string
SenderId: null | string
Status: string
@@ -369,13 +369,13 @@
<ion-item>
<ion-label>
<p class="d-flex ion-justify-content-between">
<span class="attach-title-item">{{document.Assunto}}</span>
<span class="attach-title-item">{{document.subject}}</span>
<span class="app-name">{{document.appName}}</span>
<span class="close-button text-black cursor-pointer" (click)="removeAttachment(i)" >
<ion-icon class="font-20" src="assets/images/icons-delete-25.svg"></ion-icon>
</span>
</p>
<p><span class="span-left">{{(document.EntidadeOrganicaNome || document.Sender)}}</span><span class="span-right"> {{(document.Data || document.DocDate) | date: 'dd-MM-yyyy HH:mm'}} </span></p>
<p><span class="span-left">{{(document.EntidadeOrganicaNome || document.Sender)}}</span><span class="span-right"> {{(document.dateEntry || document.DocDate) | date: 'dd-MM-yyyy HH:mm'}} </span></p>
</ion-label>
</ion-item>
</ion-list>
@@ -680,6 +680,7 @@ export class NewEventPage implements OnInit {
componentProps: {
type: 'AccoesPresidenciais & ArquivoDespachoElect',
showSearchInput: true,
eventAgenda: true,
select: true
}
});
+26 -11
View File
@@ -44,7 +44,7 @@
<!-- Search drop down -->
<div class="advance-search pa-0 pt-10 pr-10 flex-md-grow-1">
<ion-form >
<ion-form>
<div class="searchParent">
<div class="d-flex search-input-container ion-justify-content-between searchChild">
@@ -54,8 +54,8 @@
</button>
</div> -->
<div class="input-text d-flex ion-align-items-center pm-10 pl-10">
<ion-input (keyup.enter)="basicSearch()" [(ngModel)]='searchSubject' class="search-input {{Cy.p.search.input.subject}}" type="search"
placeholder="Assunto"></ion-input>
<ion-input (keyup.enter)="basicSearch()" [(ngModel)]='searchSubject'
class="search-input {{Cy.p.search.input.subject}}" type="search" placeholder="Assunto"></ion-input>
</div>
<!-- <div (click)="clearSearchInput()" class="d-flex align-center icon">
@@ -71,13 +71,20 @@
</div>
<div *ngIf="!showAdvanceSearch" class="icon-z icon-most-searched-word-open pl-10 cursor-pointer" (click)="showHideAdvanceSearch(true)">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' && type!='Agenda'" src="assets/images/theme/gov/filter_icon_grey.svg" class="icon" slot="end"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme != 'default'&& type!='Agenda' " src="assets/images/theme/gov/filter_icon_grey.svg" class="icon" slot="end"></ion-icon>
<div *ngIf="!showAdvanceSearch" class="icon-z icon-most-searched-word-open pl-10 cursor-pointer"
(click)="showHideAdvanceSearch(true)">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' && type!='Agenda'"
src="assets/images/theme/gov/filter_icon_grey.svg" class="icon" slot="end"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme != 'default'&& type!='Agenda' "
src="assets/images/theme/gov/filter_icon_grey.svg" class="icon" slot="end"></ion-icon>
</div>
<div *ngIf="showAdvanceSearch " class="icon-z icon-most-searched-word-open align-md-baseline pl-10 cursor-pointer" (click)="showHideAdvanceSearch(false)" >
<ion-icon *ngIf="ThemeService.currentTheme == 'default' && type!='Agenda' "src="assets/images/theme/gov/filter_icon.svg" class="icon" slot="end"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && type!='Agenda'" src="assets/images/theme/gov/filter_icon.svg" class="icon" slot="end"></ion-icon>
<div *ngIf="showAdvanceSearch "
class="icon-z icon-most-searched-word-open align-md-baseline pl-10 cursor-pointer"
(click)="showHideAdvanceSearch(false)">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' && type!='Agenda' "
src="assets/images/theme/gov/filter_icon.svg" class="icon" slot="end"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && type!='Agenda'"
src="assets/images/theme/gov/filter_icon.svg" class="icon" slot="end"></ion-icon>
</div>
</div>
@@ -292,14 +299,14 @@
<div class="content ion-align-items-center">
<div class="d-flex ion-justify-content-between ">
<span class="result-name">{{ searchDocument.Assunto}}</span>
<span class="result-name">{{ searchDocument.subject}}</span>
<span class="app-name"
*ngIf="itemIcons() == 'AccoesPresidenciais & ArquivoDespachoElect' || itemIcons() == 'Correspondencia' ">{{
searchDocument.appName}}</span>
</div>
<div class="d-flex ion-justify-content-between ">
<span class="organic-entity">{{ searchDocument.EntidadeOrganicaNome }}</span>
<span class="documente-date">{{ formateIsoDate(searchDocument.Data) }}</span>
<span class="documente-date">{{ formateIsoDate(searchDocument.dateEntry) }}</span>
</div>
<div *ngIf="select" (click)="view(searchDocument)"> Ver</div>
@@ -309,6 +316,14 @@
</ul>
</div>
<!-- <a href="#" class="previous">&laquo; Previous</a>
<a href="#" class="next">Next &raquo;</a> -->
<div class="nextAndPreviewDiv" >
<a href="#" class="previous round" (click)="previeweButton($event)">&#8249;</a>
<div>{{pageNumber + "/" + totalPage}}</div>
<a href="#" class="next round" (click)="nextButton($event)" >&#8250;</a>
</div>
</div>
</div>
+30
View File
@@ -290,3 +290,33 @@ ion-slide {
.swiper-container {
width: 100%;
}
a {
text-decoration: none;
display: inline-block;
padding: 8px 16px;
}
a:hover {
background-color: #ddd;
color: black;
}
.previous {
background-color: #f1f1f1;
color: black;
}
.next {
background-color: #ffb81c;
color: white;
}
.round {
border-radius: 50%;
}
.nextAndPreviewDiv {
display:inline-flex
}
+83 -9
View File
@@ -18,6 +18,8 @@ import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-pick
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
import { momentG } from 'src/plugin/momentG';
import { Cy } from 'cypress/enum'
import { AgendaDataRepositoryService } from 'src/app/services/Repositorys/Agenda/agenda-data-repository.service';
import { SessionStore } from 'src/app/store/session.service';
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
parse: {
@@ -91,9 +93,13 @@ export class SearchPage implements OnInit {
select: boolean = false;
showSearchInput = false
eventAgenda = false;
checkRoutPublication: boolean;
checkDateEnd: boolean;
datePickerPlaceholder: string;
pageNumber = 1;
pageSize = 10;
totalPage: number;
@ViewChild('picker1') picker1: any;
@@ -107,7 +113,8 @@ export class SearchPage implements OnInit {
private navParams: NavParams,
public ThemeService: ThemeService,
private router: Router,
private httpErrorhandle: HttpErrorHandle) {
private httpErrorhandle: HttpErrorHandle,
private agendaDataRepository: AgendaDataRepositoryService) {
this.ordinance = "recent";
this.currentPath = window.location.pathname;
@@ -117,6 +124,7 @@ export class SearchPage implements OnInit {
this.select = this.navParams.get('select');
this.showSearchInput = this.navParams.get('showSearchInput');
this.eventAgenda = this.navParams.get('eventAgenda')
if (this.type == null || this.type == undefined) {
@@ -141,8 +149,8 @@ export class SearchPage 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;
}
})
@@ -204,7 +212,7 @@ export class SearchPage implements OnInit {
ngOnInit() {
if(this.currentPath.includes('/home/publications')) {
if (this.currentPath.includes('/home/publications')) {
this.checkRoutPublication = false;
this.checkDateEnd = true;
this.datePickerPlaceholder = 'Data Inicio*'
@@ -382,8 +390,34 @@ export class SearchPage implements OnInit {
} else {
this.showLoader = true;
this.search.basicSearch(this.searchSubject, searchDocumentDate,searchDocumentDateEnd, this.searchSenderId
this.agendaDataRepository.getDocumentAttachments(361, SessionStore.user.UserId, this.searchSubject, this.pageNumber, this.pageSize).subscribe((values) => {
this.totalPage = values.data.total / this.pageSize;
this.totalPage = Math.round(this.totalPage)
console.log(values.data.result)
this.searchDocuments = this.sortArrayISODate(values.data.result);
this.reorderList(this.ordinance);
// hide show document
if (this.searchDocuments.length >= 1) {
this.showDocuments = true;
} else {
this.showDocuments = false
}
this.showLoader = false;
this.loadWordCloud();
}, error => {
this.showLoader = false;
// this.searchResult = "Registo não encontrado"
this.httpErrorhandle.httpStatusHandle(error)
// console.log(error)
})
return
this.search.basicSearch(this.searchSubject, searchDocumentDate, searchDocumentDateEnd, this.searchSenderId
, this.searchOrganicEntiryCode, this.searchDocTypeId, '0').subscribe(res => {
console.log(this.searchDocTypeId)
return
if (!res.Categories.length) {
this.searchResult = "Não encontramos o que procura";
@@ -418,6 +452,32 @@ export class SearchPage implements OnInit {
});
}
}
else if (this.type == "AccoesPresidenciais & ArquivoDespachoElect" && this.eventAgenda == true) {
this.showLoader = true;
this.agendaDataRepository.getDocumentAttachments(361, SessionStore.user.UserId, this.searchSubject, this.pageNumber, this.pageSize).subscribe((values) => {
this.totalPage = values.data.total / this.pageSize;
this.totalPage = Math.round(this.totalPage)
console.log(values.data.result)
this.searchDocuments = this.sortArrayISODate(values.data.result);
this.reorderList(this.ordinance);
// hide show document
if (this.searchDocuments.length >= 1) {
this.showDocuments = true;
} else {
this.showDocuments = false
}
this.showLoader = false;
this.loadWordCloud();
}, error => {
this.showLoader = false;
// this.searchResult = "Registo não encontrado"
this.httpErrorhandle.httpStatusHandle(error)
// console.log(error)
})
}
else if (this.type == "AccoesPresidenciais & ArquivoDespachoElect") {
this.searchCategories = [];
@@ -536,7 +596,7 @@ export class SearchPage implements OnInit {
} else {
this.showLoader = true;
this.search.basicSearch(this.searchSubject, searchDocumentDate,searchDocumentDateEnd, this.searchSenderId
this.search.basicSearch(this.searchSubject, searchDocumentDate, searchDocumentDateEnd, this.searchSenderId
, this.searchOrganicEntiryCode, this.searchDocTypeId, '8').subscribe(res => {
if (!res.Categories.length) {
this.searchResult = "Não encontramos o que procura";
@@ -579,7 +639,7 @@ export class SearchPage implements OnInit {
}
});
}
if (this.searchSubject.trim() == "" && searchDocumentDate == null&& searchDocumentDateEnd == null && this.searchSenderId == null && this.searchOrganicEntiryCode == null && this.searchDocTypeId == null) {
if (this.searchSubject.trim() == "" && searchDocumentDate == null && searchDocumentDateEnd == null && this.searchSenderId == null && this.searchOrganicEntiryCode == null && this.searchDocTypeId == null) {
this.searchResult = "Campo de pesquisa esta vazio, entre com assunto que deseja pesquisa";
console.log('enter text');
@@ -793,13 +853,13 @@ export class SearchPage implements OnInit {
// });
if (this.searchSubject.trim() == "" && searchDocumentDate == null && searchDocumentDateEnd == null && this.searchSenderId == null && this.searchOrganicEntiryCode == null && this.searchDocTypeId == null) {
if (this.searchSubject.trim() == "" && searchDocumentDate == null && searchDocumentDateEnd == null && this.searchSenderId == null && this.searchOrganicEntiryCode == null && this.searchDocTypeId == null) {
this.searchResult = "Campo de pesquisa esta vazio, entre com assunto que deseja pesquisa";
console.log('enter text');
} else {
this.showLoader = true;
this.search.basicSearchPublication(this.searchSubject, searchDocumentDate,searchDocumentDateEnd, this.searchSenderId
this.search.basicSearchPublication(this.searchSubject, searchDocumentDate, searchDocumentDateEnd, this.searchSenderId
, this.searchOrganicEntiryCode, this.searchDocTypeId, '386').subscribe(res => {
if (!res.Categories.length) {
this.searchResult = "Não encontramos o que procura";
@@ -1136,4 +1196,18 @@ export class SearchPage implements OnInit {
await modal.present();
}
nextButton(event) {
event.preventDefault();
this.pageNumber++;
this.basicSearch()
}
previeweButton(event) {
event.preventDefault();
if (this.pageNumber > 1) {
this.pageNumber--;
this.basicSearch()
}
}
}
@@ -93,7 +93,7 @@ export class AgendaDataRepositoryService {
type: this.utils.calendarTypeSeleted(eventData.Category),
category: this.utils.calendarCategorySeleted(eventData.CalendarName),
attendees: this.utils.attendeesAdded(eventData.Attendees),
attachments: this.utils.documentAdded(documents),
attachments: documents,
recurrence: {
frequency: 0,
occurrences: 0,
@@ -125,8 +125,10 @@ export class AgendaDataRepositoryService {
return this.agendaDataService.updateEvent(eventId, eventInput)
}
addEventAttendee(id,attendeeData) {
return this.agendaDataService.addEventAttendee(id,attendeeData);
addEventAttendee(id,attendeeData,) {
console.log(attendeeData)
console.log(this.utils.attendeesEdit(attendeeData))
return this.agendaDataService.addEventAttendee(id,{ attendees: this.utils.attendeesAdded(attendeeData) });
}
addEventAttachment(id,attachmentData) {
@@ -153,6 +155,14 @@ export class AgendaDataRepositoryService {
}
eventToaprovalStatus(eventId, status) {
return this.agendaDataService.updateEventStatus(eventId,this.utils.statusEventAproval(status))
let statusObject = {
status: this.utils.statusEventAproval(status),
comment: ""
}
return this.agendaDataService.updateEventStatus(eventId,statusObject)
}
getDocumentAttachments(applicationId,userId,subject,pageNumber,pageSize) {
return this.agendaDataService.getDocumentAttachment(applicationId,userId,subject,pageNumber,pageSize)
}
}
@@ -106,4 +106,13 @@ export class AgendaDataService {
getToken(): Observable<any> {
return this.http.get<any>(`${this.baseUrl}/Users/token`);
}
getDocumentAttachment(aplicationId,userId,value,PageNumber,PageSize): Observable<any> {
const params = new HttpParams()
.set('userId', userId)
.set('Value', value)
.set('PageNumber', PageNumber)
.set('PageSize', PageSize);
return this.http.get<any>(`${this.baseUrl}/Documents/Attachments${aplicationId}`, {params});
}
}
@@ -21,7 +21,8 @@ export class EventMapper {
"EndDate": dto.endDate,
"EventType": "Single",
"Attendees": dto.attendees.map((e) => ({
Id: e.id,
//Id: e.id,
wxUserId: e.wxUserId,
EmailAddress: e.emailAddress,
Name: e.name,
IsRequired: e.attendeeType == '0' ? true : false,
@@ -73,6 +73,19 @@ export class Utils {
}
editDocumentAdded(documents: any[]) {
console.log('document added', documents)
return documents.map((element) => {
return {
docId: parseInt(element.SourceId),
sourceName: element.SourceName,
description: "",
applicationId: parseInt(element.ApplicationId)
};
});
}
atendeesSeletedType(type) {
var selectedType = {
@@ -105,4 +118,15 @@ export class Utils {
}
return selectedType[type];
}
attendeesEdit(taskParticipants: any[]) {
return taskParticipants.map((e) => {
return {
name: e.Name,
emailAddress: e.EmailAddress,
attendeeType: this.atendeesSeletedType(JSON.stringify(e.IsRequired)),
wxUserId: e.wxUserId || e.Id,
}
});
}
}
@@ -23,19 +23,19 @@ export class ApproveEventPage implements OnInit {
event: Event;
@Input() loadedEvent: EventToApproveDetails;
loadedAttachments:any;
customDate:any;
today:any;
loadedAttachments: any;
customDate: any;
today: any;
show: boolean = false;
months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"];
@Input() serialNumber:string;
@Input() showComponent:string;
@Input() serialNumber: string;
@Input() showComponent: string;
@Input() componentTransparent: any
@Input() InstanceId:string;
@Input() showAside:boolean;
@Input() InstanceId: string;
@Input() showAside: boolean;
@Output() approveEventDismiss = new EventEmitter<any>();
@Output() closeEventToApprove = new EventEmitter<any>();
@@ -53,12 +53,12 @@ export class ApproveEventPage implements OnInit {
public ThemeService: ThemeService,
private httpErroHandle: HttpErrorHandle,
public TaskService: TaskService,
public AgendaDataRepositoryService: AgendaDataRepositoryService
private agendaDataRepository: AgendaDataRepositoryService
) {
// Event to approve list
window['edit-approve-event-desktop'] = ()=> {
window['edit-approve-event-desktop'] = () => {
this.getTask()
}
}
@@ -80,31 +80,38 @@ export class ApproveEventPage implements OnInit {
async getTask() {
const res = await this.AgendaDataRepositoryService.getEventToApproveById(this.serialNumber)
const res = await this.agendaDataRepository.getEventToApproveById(this.serialNumber)
if(res.isOk()) {
if (res.isOk()) {
this.loadedEvent = res.value;
console.log('attachment',res.value)
console.log('attachment', res.value)
this.loadedAttachments = this.loadedEvent.Attachments
this.today = new Date(res.value.workflowInstanceDataFields.StartDate);
//
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]);
this.customDate = this.days[this.today.getDay()] + ", " + this.today.getDate() + " de " + (this.months[this.today.getMonth()]);
} else {
console.log(res.error.status)
}
}
async approveTask(serialNumber:string) {
async approveTask(serialNumber: string) {
let body = { "serialNumber": serialNumber, "action": "Aprovar" }
const loader = this.toastService.loading()
try {
await this.processes.PostTaskAction(body).toPromise()
this.modalController.dismiss(serialNumber);
this.httpErroHandle.httpsSucessMessagge('Aprovar')
this.TaskService.loadEventosParaAprovacao();
this.agendaDataRepository.eventToaprovalStatus(serialNumber, 'Approved').subscribe((value) => {
console.log(value)
this.modalController.dismiss(serialNumber);
this.httpErroHandle.httpsSucessMessagge('Aprovar')
this.TaskService.loadEventosParaAprovacao();
}, ((error) => {
console.log('aprove event error: ', error)
this.httpErroHandle.httpStatusHandle(error)
}))
/* await this.processes.PostTaskAction(body).toPromise() */
} catch (error) {
this.httpErroHandle.httpStatusHandle(error)
} finally {
@@ -114,7 +121,7 @@ export class ApproveEventPage implements OnInit {
}
async rejectTask(serialNumber:string) {
async rejectTask(serialNumber: string) {
let body = { "serialNumber": serialNumber, "action": "Rejeitar" }
@@ -139,13 +146,13 @@ export class ApproveEventPage implements OnInit {
try {
this.loadedAttachments = await this.attachmentsService.getAttachmentsById(this.InstanceId).toPromise();
} catch (error) {
console.error('getAttchaments',error)
console.error('getAttchaments', error)
}
}
async viewDocument(DocId:string, Document) {
async viewDocument(DocId: string, Document) {
const modal = await this.modalController.create({
component: ViewDocumentPage,
@@ -168,7 +175,7 @@ export class ApproveEventPage implements OnInit {
}
async openOptions(ev:any) {
async openOptions(ev: any) {
const popover = await this.popoverController.create({
component: EventActionsPopoverPage,
componentProps: {
@@ -178,7 +185,7 @@ export class ApproveEventPage implements OnInit {
event: ev,
translucent: true
});
return await popover.present().then(() =>{
return await popover.present().then(() => {
this.TaskService.loadEventosParaAprovacao()
this.getTask()
}, (error) => {
@@ -186,11 +193,11 @@ export class ApproveEventPage implements OnInit {
})
}
async emendTask(serialNumber:string) {
async emendTask(serialNumber: string) {
const modal = await this.modalController.create({
component: EmendMessageModalPage,
componentProps:{
componentProps: {
},
cssClass: 'emend-message-modal',
backdropDismiss: false
@@ -199,46 +206,53 @@ export class ApproveEventPage implements OnInit {
modal.onDidDismiss()
.then( async (res) => {
.then(async (res) => {
if(res.data.option == 'save') {
if (res.data.option == 'save') {
let body = { "serialNumber": serialNumber,
"action": "Emendar",
let body = {
"serialNumber": serialNumber,
"action": "Emendar",
"dataFields": {
"ReviewUserComment": res.data,
"ReviewUserComment": res.data,
}
}
const loader = this.toastService.loading();
try {
/* await this.processes.PostTaskAction(body).toPromise(); */
this.agendaDataRepository.eventToaprovalStatus(serialNumber, 'Revision').subscribe((value) => {
this.httpErroHandle.httpsSucessMessagge('Rever')
this.TaskService.loadEventosParaAprovacao();
this.close();
},((error) => {
console.log('send event to revision error: ', error)
this.httpErroHandle.httpStatusHandle(error)
}));
} catch (error) {
this.httpErroHandle.httpStatusHandle(error)
} finally {
loader.remove()
}
} else {
}
const loader = this.toastService.loading();
try {
await this.processes.PostTaskAction(body).toPromise();
this.httpErroHandle.httpsSucessMessagge('Rever')
this.TaskService.loadEventosParaAprovacao();
this.close();
} catch (error) {
this.httpErroHandle.httpStatusHandle(error)
} finally {
loader.remove()
}
} else {
}
}, (error) => {
console.log(error)
});
}, (error) => {
console.log(error)
});
await modal.present();
}
goToEventsToApprove() {
if(window.location.pathname.startsWith('/home/agenda')) {
if (window.location.pathname.startsWith('/home/agenda')) {
this.close()
} else {
let navigationExtras: NavigationExtras = {
@@ -352,7 +352,7 @@
<ion-item class="width-100" *ngFor="let document of loadedAttachments; let i = index">
<ion-label class="width-100 d-block list" >
<p class="d-flex ion-justify-content-between">
<span class="attach-title-item">{{document.Description}}</span>
<span class="attach-title-item">{{document.subject}}</span>
<span class="app-name" *ngIf="document.ApplicationId == 8"> Correspondencia </span>
<span class="app-name" *ngIf="document.ApplicationId == 386"> AccoesPresidenciais </span>
<span class="app-name" *ngIf="document.ApplicationId == 361 "> ArquivoDespachoElect </span>
@@ -360,7 +360,7 @@
<ion-icon class="font-20" src="assets/images/icons-delete-25.svg"></ion-icon>
</span>
</p>
<p><span class="span-left" *ngIf="document.Stakeholders != false">{{document.Stakeholders}}</span><span class="span-right" *ngIf="document.CreateDate != false"> {{document.CreateDate }} </span></p>
<p><span class="span-left" *ngIf="document.Stakeholders != false">{{document.Stakeholders}}</span><span class="span-right" *ngIf="document.dateEntry != false"> {{document.dateEntry }} </span></p>
</ion-label>
</ion-item>
</ion-list>
@@ -56,11 +56,11 @@ export class EditEventToApprovePage implements OnInit {
showLoader = false
get dateStart () {
get dateStart() {
return this.dateControlStart.value
}
get dateEnd () {
get dateEnd() {
return this.dateControlEnd.value
}
@@ -69,12 +69,12 @@ export class EditEventToApprovePage implements OnInit {
@ViewChild('inicio') inicio: any;
@ViewChild('picker1') picker1: any;
loadedAttachments: Attachment[]= []
loadedAttachments: any[] = []
eventProcess = {
serialNumber: "",
taskStartDate: "",
workflowInstanceDataFields:{
workflowInstanceDataFields: {
Body: "",
OccurrenceType: '',
Category: '',
@@ -97,9 +97,9 @@ export class EditEventToApprovePage implements OnInit {
}
show = false
isRecurring:string;
isRecurring: string;
isEventEdited: boolean;
profile:string;
profile: string;
eventAttendees: EventPerson[];
loadedEventAttachments: Attachment[];
@@ -111,6 +111,8 @@ export class EditEventToApprovePage implements OnInit {
Form: FormGroup;
validateFrom = false
addedAttachmentsList = [];
deletedAttachmentsList = [];
@Output() openAttendeesComponent = new EventEmitter<any>();
@Output() clearContact = new EventEmitter<any>();
@@ -130,7 +132,7 @@ export class EditEventToApprovePage implements OnInit {
private eventsService: EventsService,
public alertController: AlertController,
private attachmentsService: AttachmentsService,
private processes:ProcessesService,
private processes: ProcessesService,
private toastService: ToastService,
public ThemeService: ThemeService,
public httpErrorHandler: HttpErrorHandle,
@@ -142,7 +144,7 @@ export class EditEventToApprovePage implements OnInit {
ngOnInit() {
if(this.restoreTemporaryData()){
if (this.restoreTemporaryData()) {
this.setOtherData()
} else {
this.getTask();
@@ -156,60 +158,60 @@ export class EditEventToApprovePage implements OnInit {
const res: any = await this.agendaDataRepository.getEventToApproveById(this.serialNumber)
console.log('evento to apro to edit', res.value)
this.eventProcess = res.value;
this.eventProcess = res.value;
this.eventProcess.workflowInstanceDataFields.LastOccurrence = new Date(this.eventProcess.workflowInstanceDataFields.LastOccurrence)
this.eventProcess.workflowInstanceDataFields.LastOccurrence = new Date(this.eventProcess.workflowInstanceDataFields.LastOccurrence)
this.restoreDatepickerData()
this.restoreDatepickerData()
// description
let body : any =this.eventProcess.workflowInstanceDataFields.Body.replace(/<[^>]+>/g, '')
this.eventProcess.workflowInstanceDataFields.Body = body
this.eventProcess.workflowInstanceDataFields.Category = this.eventProcess.workflowInstanceDataFields.EventType
// description
let body: any = this.eventProcess.workflowInstanceDataFields.Body.replace(/<[^>]+>/g, '')
this.eventProcess.workflowInstanceDataFields.Body = body
this.eventProcess.workflowInstanceDataFields.Category = this.eventProcess.workflowInstanceDataFields.EventType
this.InstanceId = this.eventProcess.workflowInstanceDataFields.InstanceId
this.loadedAttachments = res.value.Attachments;
console.log(this.loadedAttachments)
this.getAttachments()
this.InstanceId = this.eventProcess.workflowInstanceDataFields.InstanceId
this.loadedAttachments = res.value.Attachments;
console.log(this.loadedAttachments)
this.getAttachments()
this.setOtherData()
this.setOtherData()
this.saveTemporaryData()
this.saveTemporaryData()
}
getRecurrenceTypes() {
this.eventsService.getRecurrenceTypes().subscribe(res=>{
this.eventsService.getRecurrenceTypes().subscribe(res => {
this.recurringTypes = res;
});
}
onSelectedRecurringChanged(ev:any) {
onSelectedRecurringChanged(ev: any) {
this.calculetedLastOccurrence(ev);
if(ev.length > 1) {
if (ev.length > 1) {
this.eventProcess.workflowInstanceDataFields.OccurrenceType = ev.filter(data => data != '-1');
}
if(ev.length == 0) {
if (ev.length == 0) {
this.eventProcess.workflowInstanceDataFields.OccurrenceType = "-1";
}
}
calculetedLastOccurrence(type:number){
calculetedLastOccurrence(type: number) {
var valor;
var opcao: boolean;
if (type == 0) {
valor = 7;
opcao = true;
} else if(type == 1){
} else if (type == 1) {
valor = 30;
opcao = true;
} else if(type == 2){
} else if (type == 2) {
valor = 1;
opcao = false;
}else if(type == 3){
} else if (type == 3) {
valor = 5;
opcao = false;
}
@@ -217,7 +219,7 @@ export class EditEventToApprovePage implements OnInit {
}
defineLastOccurrence(valor:number, opcao:boolean){
defineLastOccurrence(valor: number, opcao: boolean) {
var time = new Date(this.eventProcess.workflowInstanceDataFields.EndDate);
if (opcao == true) {
time.setDate(time.getDate() + valor);
@@ -236,9 +238,9 @@ export class EditEventToApprovePage implements OnInit {
}
setOtherData() {
if(this.eventProcess.workflowInstanceDataFields.ParticipantsList) {
if (this.eventProcess.workflowInstanceDataFields.ParticipantsList) {
this.eventProcess.workflowInstanceDataFields.ParticipantsList.forEach(e => {
if(e.IsRequired) {
if (e.IsRequired) {
this.taskParticipants.push(e);
} else {
this.taskParticipantsCc.push(e);
@@ -246,10 +248,10 @@ export class EditEventToApprovePage implements OnInit {
})
}
this.taskParticipants = removeDuplicate(this.taskParticipants)
this.taskParticipantsCc = removeDuplicate(this.taskParticipantsCc)
this.taskParticipants = removeDuplicate(this.taskParticipants)
this.taskParticipantsCc = removeDuplicate(this.taskParticipantsCc)
if(this.eventProcess.workflowInstanceDataFields.IsRecurring == false) {
if (this.eventProcess.workflowInstanceDataFields.IsRecurring == false) {
this.isRecurring = "Não se repete";
}
else {
@@ -280,7 +282,7 @@ export class EditEventToApprovePage implements OnInit {
runValidation() {
this.validateFrom = true
this.validateFrom = true
}
injectValidation() {
@@ -318,7 +320,7 @@ export class EditEventToApprovePage implements OnInit {
this.injectValidation()
this.runValidation()
if(this.Form.invalid) return false
if (this.Form.invalid) return false
// set dates to eventProcess object
this.dateControlStart = new FormControl(moment(new Date(this.eventProcess.workflowInstanceDataFields.StartDate)).add(1, 'hours'));
@@ -326,7 +328,7 @@ export class EditEventToApprovePage implements OnInit {
// this.restoreDatepickerData()
// this.getDatepickerData()
this.taskParticipantsCc.forEach( e => {
this.taskParticipantsCc.forEach(e => {
e.IsRequired = false
})
@@ -336,9 +338,9 @@ export class EditEventToApprovePage implements OnInit {
this.eventProcess.workflowInstanceDataFields.ParticipantsList = this.taskParticipants.concat(this.taskParticipantsCc)
this.eventProcess.workflowInstanceDataFields.ParticipantsList.forEach(e=>{
this.eventProcess.workflowInstanceDataFields.ParticipantsList.forEach(e => {
if(e.hasOwnProperty('$type')) {
if (e.hasOwnProperty('$type')) {
delete e.$type
}
})
@@ -375,48 +377,52 @@ export class EditEventToApprovePage implements OnInit {
console.log('edit event error: ', error)
}));
this.agendaDataRepository.addEventAttendee(this.eventProcess.serialNumber, { attendees: this.attendeesAdded(this.eventProcess.workflowInstanceDataFields.ParticipantsList) }).subscribe((value) => {
this.agendaDataRepository.addEventAttendee(this.eventProcess.serialNumber, this.eventProcess.workflowInstanceDataFields.ParticipantsList).subscribe((value) => {
console.log(value)
}, ((error) => {
console.log('add Attendee error: ', error)
}));
this.agendaDataRepository.addEventAttachment(this.eventProcess.serialNumber, { attachments: this.documentAdded(this.loadedAttachments) }).subscribe((value) => {
console.log(value)
}, ((error) => {
this.showLoader = false
console.log('add attachment error: ', error)
}));
if (this.addedAttachmentsList.length > 0) {
this.agendaDataRepository.addEventAttachment(this.eventProcess.serialNumber, { attachments: this.loadedAttachments }).subscribe((value) => {
console.log(value)
}, ((error) => {
this.showLoader = false
console.log('add attachment error: ', error)
}));
}
if (this.deletedAttachmentsList.length > 0) {
this.agendaDataRepository.removeEventAttachment(this.eventProcess.serialNumber, { attachments: [] }).subscribe((value) => {
console.log(value)
}, ((error) => {
this.showLoader = false
console.log('remove attachment error: ', error)
}));
}
this.close()
this.httpErrorHandler.httpsSucessMessagge('Editar evento');
} catch(e) {
} catch (e) {
this.httpErrorHandler.httpStatusHandle(e);
this.toastService._badRequest('Evento não editado');
}
this.loadedAttachments.forEach((document:any)=>{
if(document['action'] == 'add') {
this.loadedAttachments.forEach((document: any) => {
if (document['action'] == 'add') {
delete document.action
this.attachmentsService.setEventAttachmentById(document).subscribe(()=>{
this.attachmentsService.setEventAttachmentById(document).subscribe(() => {
window['edit-approve-event-desktop']()
}, error =>{
}, error => {
this.toastService.badRequest();
});
} else if(document['action'] == 'delete') {
} else if (document['action'] == 'delete') {
delete document.action
this.attachmentsService.deleteEventAttachmentById(document.Id).subscribe( res=>{
this.attachmentsService.deleteEventAttachmentById(document.Id).subscribe(res => {
window['edit-approve-event-desktop']()
}, error =>{
}, error => {
this.toastService.badRequest()
})
}
@@ -462,7 +468,7 @@ export class EditEventToApprovePage implements OnInit {
await this.save();
if(this.eventProcess['activityInstanceName'] == 'Editar Evento') {
if (this.eventProcess['activityInstanceName'] == 'Editar Evento') {
this.reenviar();
}
@@ -472,7 +478,7 @@ export class EditEventToApprovePage implements OnInit {
let body = {
serialNumber: this.eventProcess.serialNumber,
action: "Reenviar",
dataFields: {
dataFields: {
ReviewUserComment: "",
}
}
@@ -484,13 +490,13 @@ export class EditEventToApprovePage implements OnInit {
this.toastService._successMessage();
this.goToApproveEventList();
} catch (error) {
if(error.status == 0) {
if (error.status == 0) {
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
} else {
this.toastService._badRequest();
}
} finally {
} finally {
loader.remove()
}
}
@@ -500,9 +506,9 @@ export class EditEventToApprovePage implements OnInit {
this.modalController.dismiss();
}
dynamicSetIntervenient({taskParticipants, taskParticipantsCc}) {
this.taskParticipants = removeDuplicate(taskParticipants) ;
this.taskParticipantsCc = removeDuplicate(taskParticipantsCc) ;
dynamicSetIntervenient({ taskParticipants, taskParticipantsCc }) {
this.taskParticipants = removeDuplicate(taskParticipants);
this.taskParticipantsCc = removeDuplicate(taskParticipantsCc);
}
@@ -539,9 +545,9 @@ export class EditEventToApprovePage implements OnInit {
restoreTemporaryData(): boolean {
const restoredData = window['temp.path:/shared/agenda/edit-event-to-approve.ts']
const restoredData = window['temp.path:/shared/agenda/edit-event-to-approve.ts']
if(JSON.stringify(restoredData) != "{}" && undefined != restoredData) {
if (JSON.stringify(restoredData) != "{}" && undefined != restoredData) {
this.eventProcess = restoredData.eventProcess
// restore dater for date and hours picker
@@ -559,10 +565,10 @@ export class EditEventToApprovePage implements OnInit {
try {
result = await this.attachmentsService.getAttachmentsById(this.InstanceId).toPromise();
} catch (error) {
console.error('getAttachment',error)
console.error('getAttachment', error)
}
result.forEach((e)=>{
result.forEach((e) => {
e.action = false
})
@@ -572,8 +578,10 @@ export class EditEventToApprovePage implements OnInit {
}
deleteAttachment(attachment: Attachment, index) {
const id: any = this.loadedEventAttachments[index].Id
console.log(attachment)
this.loadedAttachments[index]['action'] = 'delete'
this.deletedAttachmentsList.push(id)
}
async getDoc() {
@@ -583,16 +591,17 @@ export class EditEventToApprovePage implements OnInit {
componentProps: {
type: 'AccoesPresidenciais & ArquivoDespachoElect',
showSearchInput: true,
eventAgenda: true,
select: true,
}
});
await modal.present();
modal.onDidDismiss().then( async (res)=>{
if(res){
modal.onDidDismiss().then(async (res) => {
if (res) {
const data: SearchList = res.data.selected;
console.log(data)
const DocumentToSave: any = {
/* const DocumentToSave: any = {
SourceTitle: data.Assunto,
ParentId: this.InstanceId,
Source: '1',
@@ -607,10 +616,11 @@ export class EditEventToApprovePage implements OnInit {
Description: data.DocTypeDesc,
SourceName: data.Assunto,
Stakeholders: data.EntidadeOrganicaNome,
};
}; */
this.loadedAttachments.push(DocumentToSave)
this.loadedAttachments.push(data)
this.addedAttachmentsList.push(data)
// await this.attachmentsService.setEventAttachmentById(DocumentToSave).subscribe(()=>{
@@ -345,7 +345,7 @@
<ion-item class="width-100">
<ion-label class="width-100">
<p class="d-flex ion-justify-content-between">
<span class="attach-title-item">{{document.SourceName}}</span>
<span class="attach-title-item">{{document.subject}}</span>
<span class="app-name" *ngIf="document.ApplicationId == '8'"> Correspondencia </span>
<span class="app-name" *ngIf="document.ApplicationId == '386'"> AccoesPresidenciais </span>
<span class="app-name" *ngIf="document.ApplicationId == '361' "> ArquivoDespachoElect </span>
@@ -353,7 +353,7 @@
<ion-icon class="font-20" src="assets/images/icons-delete-25.svg"></ion-icon>
</span>
</p>
<p><span class="span-left">{{document.Stakeholders}}</span><span class="span-right"> {{document.CreateDate |
<p><span class="span-left">{{document.Stakeholders}}</span><span class="span-right"> {{document.dateEntry |
date: 'dd-MM-yyyy HH:mm'}} </span></p>
</ion-label>
</ion-item>
@@ -17,6 +17,7 @@ import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
import { ContactsService } from 'src/app/services/contacts.service'
import { DomSanitizerService } from 'src/app/services/DomSanitizer.service';
import { AgendaDataRepositoryService } from 'src/app/services/Repositorys/Agenda/agenda-data-repository.service';
import { SearchList_v2 } from 'src/app/models/search-document';
@Component({
selector: 'app-edit-event',
@@ -35,7 +36,7 @@ export class EditEventPage implements OnInit {
segment: string = "true";
eventAttendees: EventPerson[];
// minDate: string;
loadedEventAttachments: Attachment[] = [];
loadedEventAttachments: any[] = [];
recurringTypes = [];
selectedRecurringType: any;
deletedAttachmentsList = [];
@@ -344,39 +345,6 @@ export class EditEventPage implements OnInit {
}
atendeesSeletedType(type) {
var selectedType = {
'true': 1,
'false': 2,
'other': 3,
}
return selectedType[type];
}
documentAdded(documents: any[]) {
console.log('document added', documents)
return documents.map((element) => {
return {
docId: parseInt(element.SourceId),
sourceName: element.SourceName,
description: "",
applicationId: parseInt(element.ApplicationId)
};
});
}
attendeesAdded(taskParticipants: any[]) {
return taskParticipants.map((e) => {
return {
name: e.Name,
emailAddress: e.EmailAddress,
attendeeType: this.atendeesSeletedType(JSON.stringify(e.IsRequired)),
wxUserId: e.wxUserId,
}
});
}
async save_v2() {
this.injectValidation()
this.runValidation()
@@ -385,16 +353,6 @@ export class EditEventPage implements OnInit {
return false
}
/* this._postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
console.log('1',this._postEvent.Attendees)
console.log('2',this.postEvent.Attendees)
if (JSON.stringify(this._postEvent.Attendees) === JSON.stringify(this.postEvent.Attendees)) {
console.log(true)
} else {
console.log(false)
}
return */
this._postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
this.showLoader = true;
@@ -406,7 +364,7 @@ export class EditEventPage implements OnInit {
console.log('edit event error: ', error)
}));
this.agendaDataRepository.addEventAttendee(this._postEvent.EventId, { attendees: this.attendeesAdded(this._postEvent.Attendees) }).subscribe((value) => {
this.agendaDataRepository.addEventAttendee(this._postEvent.EventId, this._postEvent.Attendees).subscribe((value) => {
console.log(value)
}, ((error) => {
console.log('add Attendee error: ', error)
@@ -416,7 +374,7 @@ export class EditEventPage implements OnInit {
await this.saveDocument()
if (this.addedAttachmentsList.length > 0) {
this.agendaDataRepository.addEventAttachment(this._postEvent.EventId, { "attachments": this.documentAdded(this._postEvent.Attachments) }).subscribe((value) => {
this.agendaDataRepository.addEventAttachment(this._postEvent.EventId, { "attachments": this._postEvent.Attachments }).subscribe((value) => {
console.log(value)
}, ((error) => {
this.showLoader = false
@@ -627,13 +585,17 @@ export class EditEventPage implements OnInit {
const id: any = this.loadedEventAttachments[index].Id
if (id == 'add') {
this.loadedEventAttachments[index]['remove'] = true
console.log(id)
this.deletedAttachmentsList.push(id)
/* if (id == 'add') {
this.loadedEventAttachments = this.loadedEventAttachments.filter((e, i) => i != index)
} else {
this.loadedEventAttachments[index]['remove'] = true
console.log(id)
this.deletedAttachmentsList.push(id)
}
} */
}
@@ -644,6 +606,7 @@ export class EditEventPage implements OnInit {
cssClass: 'modal-width-100-width-background modal',
componentProps: {
type: 'AccoesPresidenciais & ArquivoDespachoElect',
eventAgenda: true,
showSearchInput: true,
select: true,
}
@@ -654,7 +617,7 @@ export class EditEventPage implements OnInit {
const data = res.data;
console.log(data)
const ApplicationIdDocumentToSave: any = {
/* const ApplicationIdDocumentToSave: any = {
SourceName: data.selected.Assunto,
ParentId: this._postEvent.EventId,
SourceId: data.selected.Id,
@@ -666,10 +629,24 @@ export class EditEventPage implements OnInit {
Source: '1',
Link: '',
SerialNumber: '',
}*/
let newDocObject: SearchList_v2 = {
docId: data.selected.docId,
sourceName: data.selected.sourceName,
description: data.selected.description,
applicationId: data.selected.applicationId,
classificator: data.selected.classificator,
dateEntry: data.selected.dateEntry,
docNumber: data.selected.docNumber,
subject: data.selected.subject,
userId: data.selected.userId
}
this.loadedEventAttachments.push(ApplicationIdDocumentToSave)
this.addedAttachmentsList.push(ApplicationIdDocumentToSave)
this.loadedEventAttachments.push(data.selected)
this.addedAttachmentsList.push(data.selected)
}
});
@@ -390,14 +390,14 @@
<ion-item>
<ion-label>
<p class="d-flex ion-justify-content-between">
<span class="attach-title-item">{{document.Assunto}}</span>
<span class="attach-title-item">{{document.subject}}</span>
<span class="app-name" *ngIf="!document.appName">{{ TaskService.attachmentAppName(document)}}</span>
<span class="app-name" *ngIf="document.appName">{{document.appName}}</span>
<span class="close-button text-black cursor-pointer" (click)="removeAttachment(i)" >
<ion-icon class="font-20" src="assets/images/icons-delete-25.svg"></ion-icon>
</span>
</p>
<p><span class="span-left">{{(document.EntidadeOrganicaNome || document.Sender)}}</span><span class="span-right"> {{(document.Data || document.DocDate) | date: 'dd-MM-yyyy HH:mm'}} </span></p>
<p><span class="span-left">{{(document.EntidadeOrganicaNome || document.Sender)}}</span><span class="span-right"> {{(document.dateEntry) | date: 'dd-MM-yyyy HH:mm'}} </span></p>
</ion-label>
</ion-item>
</ion-list>
@@ -7,7 +7,7 @@ import { Event } from 'src/app/models/event.model';
import { ModalController } from '@ionic/angular';
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
import { SearchPage } from 'src/app/pages/search/search.page';
import { SearchList } from "src/app/models/search-document";
import { SearchList, SearchList_v2 } from "src/app/models/search-document";
import { EventAttachment, EventAttachment_v2 } from 'src/app/models/attachment.model';
import { ToastService } from 'src/app/services/toast.service';
@@ -104,7 +104,7 @@ export class NewEventPage implements OnInit {
@Output() cloneAllmobileComponent = new EventEmitter<any>();
@Output() backToChat = new EventEmitter<any>();
documents: SearchList[] = [];
documents: SearchList_v2[] = [];
loggeduser: LoginUserRespose;
@ViewChild('picker') picker: any;
@@ -424,6 +424,7 @@ export class NewEventPage implements OnInit {
cssClass: 'modal-width-100-width-background modal',
componentProps: {
type: 'AccoesPresidenciais & ArquivoDespachoElect',
eventAgenda: true,
showSearchInput: true,
select: true
}
@@ -432,7 +433,15 @@ export class NewEventPage implements OnInit {
modal.onDidDismiss().then((res) => {
if (res) {
const data = res.data;
/* let newDocObject: SearchList_v2 = {
docId: parseInt(data.selected.Id),
sourceName: data.selected.Assunto,
description: "",
applicationId: data.selected.ApplicationType
} */
console.log('get doc', data)
this.documents.push(data.selected);
console.log('pushed')
}
});
@@ -537,7 +546,7 @@ export class NewEventPage implements OnInit {
this.hhtpErrorHandle.httpsSucessMessagge('new event')
}
async save() {
/* async save() {
this.injectValidation()
this.runValidation()
@@ -552,9 +561,9 @@ export class NewEventPage implements OnInit {
}
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
this.postEvent.Subject = /* this.domSanitazerService.sanitizeInput( */this.postEvent.Subject/* ); */
this.postEvent.Location = /* this.domSanitazerService.sanitizeInput( */this.postEvent.Location/* ); */
this.postEvent.Body.Text = /* this.domSanitazerService.sanitizeInput( */this.postEvent.Body.Text/* ); */
this.postEvent.Subject = this.postEvent.Subject
this.postEvent.Location = this.postEvent.Location
this.postEvent.Body.Text = this.postEvent.Body.Text
@@ -724,20 +733,6 @@ export class NewEventPage implements OnInit {
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
@@ -768,20 +763,6 @@ export class NewEventPage implements OnInit {
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
@@ -921,7 +902,7 @@ export class NewEventPage implements OnInit {
});
}
}
} */
selectedCalendarId() {
@@ -121,12 +121,12 @@
class="ion-no-margin ion-no-padding pa-0">
<ion-label class="width-100 d-flex align-center">
<p class="flex-grow-1 cursor-pointer" (click)="docIndex(i);LoadDocumentDetails()">
<span class="attach-title-item d-block">{{attach.SourceName || 'Sem título'}}</span>
<span class="attach-title-item d-block">{{attach.subject || 'Sem título'}}</span>
<span class="span-left d-block">{{attach.Stakeholders}}</span>
</p>
<div class="d-flex pr-10 cursor-pointer" (click)="docIndex(i);LoadDocumentDetails()">
<span class="span-right">{{ attach.CreateDate | date: 'dd-MM-yyyy HH:mm' }}</span>
<span class="span-right">{{ attach.dateEntry | date: 'dd-MM-yyyy HH:mm' }}</span>
</div>
<!-- <div (click)="docIndex(i);LoadDocumentDetails()" class="doc-options">
@@ -19,6 +19,7 @@ import { NavigationExtras, Router } from '@angular/router';
import { EventController } from 'src/app/controller/event'
import { DateService } from 'src/app/services/date.service';
import { AgendaDataRepositoryService } from 'src/app/services/Repositorys/Agenda/agenda-data-repository.service';
import { SearchList_v2 } from 'src/app/models/search-document';
@Component({
selector: 'app-view-event',
@@ -131,6 +132,9 @@ export class ViewEventPage implements OnInit {
if(res.isOk()) {
console.log('Loaded Event', res.value)
console.log('newAttahcmentList', res.value.Attachments)
let changeDate = this.dateService.fixDate(res.value as any) as any
this.loadedEvent = changeDate as any;
this.setTimeZone()