corretion on interceptor

This commit is contained in:
Eudes Inácio
2023-12-07 07:01:05 +01:00
39 changed files with 760 additions and 568 deletions
@@ -36,6 +36,8 @@ import { Subject } from 'rxjs';
import { TaskService } from 'src/app/services/task.service'
import { ContactsService } from 'src/app/services/contacts.service';
import { DomSanitizerService } from 'src/app/services/DomSanitizer.service';
import { ChangeProfileService } from 'src/app/services/change-profile.service';
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
parse: {
dateInput: "YYYY-MMMM-DD HH:mm"
@@ -102,8 +104,6 @@ export class NewEventPage implements OnInit {
documents: SearchList[] = [];
// minDate: string;
loggeduser: LoginUserRespose;
@ViewChild('picker') picker: any;
@ViewChild('fim') fim: any;
@@ -148,7 +148,8 @@ export class NewEventPage implements OnInit {
private processeService: ProcessesService,
public TaskService: TaskService,
private contactsService: ContactsService,
private domSanitazerService: DomSanitizerService
private domSanitazerService: DomSanitizerService,
private changeProfileService: ChangeProfileService,
) {
this.dateAdapter.setLocale('pt');
this.loggeduser = SessionStore.user;
@@ -159,6 +160,9 @@ export class NewEventPage implements OnInit {
ngOnInit() {
console.log(' INTERVENIENTES',this.taskParticipants)
this.changeProfileService.registerCallback(() => {
this.initializeData()
})
if (!this.CalendarName) {
if (this.eventService.calendarNamesAry.includes('Meu calendario')) {
@@ -174,50 +178,7 @@ export class NewEventPage implements OnInit {
this.eventBody = { BodyType: "1", Text: "" };
this.postEvent.Body = this.eventBody;
if (this.selectedSegment != "Combinada") {
this.postEvent = {
EventId: '',
Subject: '',
Body: this.eventBody,
Location: '',
CalendarId: '',
CalendarName: 'Oficial',
StartDate: this.autoStartTime,
EndDate: this.autoEndTime,
EventType: 'Reunião',
Attendees: this.attendees || null,
IsMeeting: false,
IsRecurring: false,
AppointmentState: 0,
TimeZone: '',
Organizer: '',
Category: 'Reunião',
HasAttachments: false,
EventRecurrence: { Type: '-1', LastOccurrence: this.autoEndTime },
};
}
else {
this.postEvent = {
EventId: '',
Subject: '',
Body: this.eventBody,
Location: '',
CalendarId: '',
CalendarName: 'Oficial',
StartDate: this.autoStartTime,
EndDate: this.autoEndTime,
EventType: 'Reunião',
Attendees: this.attendees || null,
IsMeeting: false,
IsRecurring: false,
AppointmentState: 0,
TimeZone: '',
Organizer: '',
Category: 'Reunião',
HasAttachments: false,
EventRecurrence: { Type: '-1', LastOccurrence: this.autoEndTime },
}
}
this.initializeData()
if (this.postEvent.Attendees != null) {
this.postEvent.Attendees.forEach(e => {
@@ -247,6 +208,53 @@ export class NewEventPage implements OnInit {
}
initializeData() {
if (this.selectedSegment != "Combinada") {
this.postEvent = {
EventId: '',
Subject: '',
Body: this.eventBody,
Location: '',
CalendarId: '',
CalendarName: 'Oficial',
StartDate: this.autoStartTime,
EndDate: this.autoEndTime,
EventType: 'Reunião',
Attendees: this.attendees || null,
IsMeeting: false,
IsRecurring: false,
AppointmentState: 0,
TimeZone: '',
Organizer: '',
Category: 'Reunião',
HasAttachments: false,
EventRecurrence: { Type: '-1', LastOccurrence: this.autoEndTime },
};
}
else {
this.postEvent = {
EventId: '',
Subject: '',
Body: this.eventBody,
Location: '',
CalendarId: '',
CalendarName: 'Oficial',
StartDate: this.autoStartTime,
EndDate: this.autoEndTime,
EventType: 'Reunião',
Attendees: this.attendees || null,
IsMeeting: false,
IsRecurring: false,
AppointmentState: 0,
TimeZone: '',
Organizer: '',
Category: 'Reunião',
HasAttachments: false,
EventRecurrence: { Type: '-1', LastOccurrence: this.autoEndTime },
}
}
}
setDefaultTime() {
this.postEvent.StartDate = this.roundTimeQuarterHour(this.CalendarDate);
this.postEvent.EndDate = this.roundTimeQuarterHourPlus15(this.postEvent.StartDate);
@@ -510,7 +518,7 @@ export class NewEventPage implements OnInit {
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);
if (this.documents.length > 0) {
@@ -688,7 +696,7 @@ export class NewEventPage implements OnInit {
}
});
});
if (DocumentToSave.length == 0) {
this.afterSave();
} */
@@ -732,7 +740,7 @@ export class NewEventPage implements OnInit {
}
});
});
if (DocumentToSave.length == 0) {
this.afterSave();
} */
@@ -745,7 +753,7 @@ export class NewEventPage implements OnInit {
}
}
@@ -39,7 +39,7 @@
<p class="item-content-detail">{{publicationFolderService.FolderDetails[folderId].Detail}}</p>
<ion-card *ngFor="let publication of publicationFolderService.publicationList[folderId] let i = index">
<ion-card-content>
@@ -56,6 +56,24 @@
</div>
</swiper-slide>
<!--
<div class="swiper-button-next"
style="
position: absolute;
background: red;
top: 50%;
">
<div>arrow-left</div>
</div>
<div class="slides-per-view"
style="
position: absolute;
background: red;
top: 50%;
right: 0px;
">
<div>arrow-rights</div>
</div>s -->
</swiper-container>
<div class="post-content">
@@ -60,10 +60,13 @@ export class ViewPublicationsPage implements OnInit {
private publicationVideoManagerService: PublicationVideoManagerService
) {
setTimeout(()=> {
setTimeout(() => {
// document.querySelector("swiper-container").shadowRoot.querySelector(".swiper-button-next").innerHTML = "ok"
// alert("ok")
// console.log("this.VideoManager", this.VideoManager, document.querySelector('.VideoManager'))
/* this.publicationVideoManagerService.setContainer(this.VideoManager.nativeElement) */
}, 2000)
}, 15000)
// this.publicationVideoManagerService.setContainer(this.VideoManager.nativeElement)
this.createPublicationList()
@@ -217,10 +220,27 @@ export class ViewPublicationsPage implements OnInit {
const findIndex = this.publicationFindIndex(publicationId, folderId)
const found = this.publicationIsPresent(publicationId, folderId)
if (!found) {
this.publicationFolderService.publicationList[folderId].push(publicationDetails)
} else {
this.publicationFolderService.publicationList[folderId][findIndex] = publicationDetails
// console.log("names");
let a: any = Object.assign({},this.publicationFolderService.publicationList[folderId][findIndex])
let b: any = Object.assign({}, publicationDetails)
a.Files = a.Files.length
b.Files = b.Files.length
if(JSON.stringify(a) != JSON.stringify(b)) {
// console.log({a, b})
this.publicationFolderService.publicationList[folderId][findIndex] = publicationDetails
} else {
// console.log({publicationDetails})
}
}
}
+2 -2
View File
@@ -29,7 +29,7 @@ import { TaskDetailsPage } from './gabinete-digital/generic/task-details/task-de
// HeaderPrPage,
// BtnSeguintePage,
// BtnModalDismissPage,
// HeaderNoSearchPage,
// HeaderNoSearchPage,
// EmptyChatPage,
// BtnCriarPage,
// BtnAdicionarPage,
@@ -47,4 +47,4 @@ import { TaskDetailsPage } from './gabinete-digital/generic/task-details/task-de
// BtnAdicionarPage,
]
})
export class SharedModule {}
export class SharedModule {}
@@ -0,0 +1,17 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { SwiperPage } from './swiper.page';
const routes: Routes = [
{
path: '',
component: SwiperPage
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class SwiperPageRoutingModule {}
+20
View File
@@ -0,0 +1,20 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { IonicModule } from '@ionic/angular';
import { SwiperPageRoutingModule } from './swiper-routing.module';
import { SwiperPage } from './swiper.page';
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
SwiperPageRoutingModule
],
declarations: [SwiperPage]
})
export class SwiperPageModule {}
+9
View File
@@ -0,0 +1,9 @@
<ion-header>
<ion-toolbar>
<ion-title>swiper</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
</ion-content>
+24
View File
@@ -0,0 +1,24 @@
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { IonicModule } from '@ionic/angular';
import { SwiperPage } from './swiper.page';
describe('SwiperPage', () => {
let component: SwiperPage;
let fixture: ComponentFixture<SwiperPage>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ SwiperPage ],
imports: [IonicModule.forRoot()]
}).compileComponents();
fixture = TestBed.createComponent(SwiperPage);
component = fixture.componentInstance;
fixture.detectChanges();
}));
it('should create', () => {
expect(component).toBeTruthy();
});
});
+15
View File
@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-swiper',
templateUrl: './swiper.page.html',
styleUrls: ['./swiper.page.scss'],
})
export class SwiperPage implements OnInit {
constructor() { }
ngOnInit() {
}
}