This commit is contained in:
tiago.kayaya
2021-08-31 16:41:05 +01:00
32 changed files with 273 additions and 159 deletions
+20 -8
View File
@@ -82,7 +82,6 @@ export class HomePage implements OnInit {
document.querySelectorAll('ion-modal').forEach((e: any) => e.remove())
});
this.updateList()
window['platform'] = platform
window['inactivity/function'] = () => {
@@ -95,13 +94,6 @@ export class HomePage implements OnInit {
}
}
var myWorker = new Worker(new URL('./nice.worker.js', import.meta.url) );
myWorker.onmessage = function(oEvent) {
console.log('Worker said : ' + oEvent.data);
}
myWorker.postMessage('ali');
}
@@ -121,7 +113,17 @@ export class HomePage implements OnInit {
this.notificationsService.onReceviNotification();
}
this.updateList()
var myWorker = new Worker(new URL('./nice.worker.js', import.meta.url) );
myWorker.onmessage = function(oEvent) {
console.log('Worker said : ' + oEvent.data);
}
myWorker.postMessage('ali');
}
mobilefirstConnect() {
if(window['WLAuthorizationManager']) {
@@ -194,6 +196,16 @@ export class HomePage implements OnInit {
}, 'any')
document.addEventListener('pause', function () {
// console.log('App going to background');
});
document.addEventListener('resume', function () {
// console.log('App coming to foreground');
});
}
}
@@ -53,7 +53,7 @@
</div>
</div>
<div class="login-preference width-100" >
<div class="login-preference width-100" *ngIf="!production">
<div class="preference">Preferência Login</div>
<ion-row>
@@ -3,6 +3,7 @@ import { AnimationController, ModalController } from '@ionic/angular';
import { FingerprintPage } from 'src/app/shared/fingerprint/fingerprint.page';
import { PinPage } from 'src/app/shared/pin/pin.page';
import { SessionStore } from 'src/app/store/session.service';
import { environment } from 'src/environments/environment';
@Component({
selector: 'app-edit-profile',
@@ -12,6 +13,7 @@ import { SessionStore } from 'src/app/store/session.service';
export class EditProfilePage implements OnInit {
SessionStore = SessionStore
production = environment.production
constructor(private modalController:ModalController,
private animationController: AnimationController
+13 -12
View File
@@ -1,3 +1,15 @@
export interface EventListStore {
title: string
startTime: Date
endTime: Date
allDay: boolean,
event: EventList,
calendarName: string
profile: "md" | "pr",
id: string
}
export interface EventList {
HasAttachments: boolean;
IsAllDayEvent: boolean;
@@ -11,17 +23,6 @@ export interface EventList {
HumanDate: string;
}
export interface EventListStore {
title: string
startTime: Date
endTime: Date
allDay: boolean,
event: EventList,
calendarName: string
profile: "md" | "pr",
id: string
}
export interface CustomCalendarEvent {
start: Date
@@ -33,5 +34,5 @@ export interface CustomCalendarEvent {
id: string
index: number,
CalendarName: string
event: EventListStore
event: EventList
}
-4
View File
@@ -33,10 +33,6 @@ export class Event{
EventRecurrence: EventRecurrence;
Name?: string
Attachments?: Attachment[];
/* public Event(){
this.EventRecurrence = new EventRecurrence();
} */
}
+17 -19
View File
@@ -25,8 +25,8 @@ import { LoginUserRespose } from 'src/app/models/user.model';
import { DateAdapter } from '@angular/material/core';
import { ToastService } from 'src/app/services/toast.service';
import { eventSource } from 'src/app/models/agenda/eventSource';
import { eventListBox as eventListBoxComponent } from './eventListBox'
import { CalendarService } from 'src/app/store/calendar.service';
import { ListBoxService } from 'src/app/services/ageanda/list-box.service';
@Component({
selector: 'app-agenda',
@@ -123,8 +123,6 @@ export class AgendaPage implements OnInit {
startTime: Date;
endTime: Date;
eventListBoxComponent = new eventListBoxComponent()
mobileComponent = {
showAddNewEvent: false,
showEditEvent: false,
@@ -162,7 +160,8 @@ export class AgendaPage implements OnInit {
authService: AuthService,
private dateAdapter: DateAdapter<any>,
private toastService: ToastService,
public calendarService: CalendarService
public calendarService: CalendarService,
private listBoxService: ListBoxService
) {
this.dateAdapter.setLocale('es');
@@ -457,7 +456,6 @@ export class AgendaPage implements OnInit {
this.eventService.getAllMdEvents( momentG(new Date(startTime),'yyyy-MM-dd HH:mm:ss'), momentG(new Date(endTime),'yyyy-MM-dd 23:59:59') ).then(
(response:any) => {
console.log(response);
// calendar
@@ -466,7 +464,7 @@ export class AgendaPage implements OnInit {
// loop
this.calendarService.pushEvent(response, 'md');
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
this.myCal.update();
this.myCal.loadEvents();
@@ -487,7 +485,7 @@ export class AgendaPage implements OnInit {
// calendar
this.calendarService.pushEvent(response, 'pr');
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
this.myCal.update();
this.myCal.loadEvents();
@@ -513,7 +511,7 @@ export class AgendaPage implements OnInit {
this.calendarService.pushEvent(response, 'pr');
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
this.myCal.update();
@@ -541,7 +539,7 @@ export class AgendaPage implements OnInit {
this.calendarService.pushEvent(eventsList, 'md');
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
this.myCal.update();
this.myCal.loadEvents();
@@ -564,7 +562,7 @@ export class AgendaPage implements OnInit {
this.calendarService.pushEvent(eventsList, 'pr');
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
this.myCal.update();
@@ -594,7 +592,7 @@ export class AgendaPage implements OnInit {
this.calendarService.pushEvent(eventsList, 'md');
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
this.myCal.update();
this.myCal.loadEvents();
@@ -616,7 +614,7 @@ export class AgendaPage implements OnInit {
this.calendarService.pushEvent(eventsList, 'pr');
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
this.myCal.update();
this.myCal.loadEvents();
@@ -647,7 +645,7 @@ export class AgendaPage implements OnInit {
// loop
this.calendarService.pushEvent(eventsList, 'md');
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
this.myCal.update();
this.myCal.loadEvents();
@@ -676,7 +674,7 @@ export class AgendaPage implements OnInit {
this.calendarService.pushEvent(eventsList, 'pr');
this.TimelinePRList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
this.TimelinePRList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
this.myCal.update();
this.myCal.loadEvents();
@@ -714,7 +712,7 @@ export class AgendaPage implements OnInit {
this.calendarService.pushEvent(eventsList, 'pr');
this.TimelinePRList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
this.TimelinePRList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
this.myCal.update();
@@ -741,8 +739,8 @@ export class AgendaPage implements OnInit {
updateEventListBox() {
this.TimelinePRList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
this.TimelinePRList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
}
@@ -941,13 +939,13 @@ export class AgendaPage implements OnInit {
if(this.profile == "mdgpr") {
this.profile ="pr";
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'pr', this.rangeStartDate, this.rangeEndDate, 'date')
}
else {
this.profile ="mdgpr";
this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
this.TimelineMDList = this.eventListBoxComponent.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
this.TimelineMDList = this.listBoxService.list(this.calendarService.eventSource, 'md', this.rangeStartDate, this.rangeEndDate, 'date')
}
}
+5 -6
View File
@@ -27,8 +27,8 @@
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
<div class="conteiner-box px-20 height-100 overflow-y-auto" ng-swipe-up="swipe($event)">
<div class="schedule">
<div class="conteiner-box px-20 height-100" ng-swipe-up="swipe($event)">
<div class="schedule height-100">
<div class="schedule-header">
<div class="title">
<ion-icon class="icon" slot="end" src="assets/images/icons-default-agenda.svg" ></ion-icon>
@@ -42,7 +42,7 @@
></ion-icon>
</button>
</div>
<div class="content">
<div class="content overflow-y-auto flex-grow-1 height-100">
<!-- {{ toDayEventStorage.eventsList | json}} -->
@@ -82,7 +82,7 @@
</div>
</div>
<div class="schedule">
<div class="schedule height-100">
<div class="schedule-header">
<div class="title">
<ion-icon class="icon" slot="end" src="assets/images/icons-correspondencias.svg"></ion-icon>
@@ -92,7 +92,7 @@
<ion-icon class="icon-next" slot="end" src="assets/images/icons-arrow-circle-arrow-right.svg"></ion-icon>
</button>
</div>
<div class="content">
<div class="content overflow-y-auto flex-grow-1 height-100">
<ion-list>
<ion-item class="cursor-pointer" lines="none" *ngFor = "let task of expedienteGdStore.list"
(click)="goToExpediente(task.serialNumber)">
@@ -113,7 +113,6 @@
</div>
</div>
<!-- <pdf-viewer [src]="pdfSrc"
[render-text]="true"
style="display: block;"
+18 -2
View File
@@ -325,17 +325,21 @@ ion-toolbar{
display: flex;
flex-wrap: wrap;
justify-content: center;
padding-bottom: 20px;
}
.schedule {
max-width: 400px;
font-family: Roboto;
margin: 10px 0px;
padding: 20px;
background-color: white;
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.07);
box-shadow: 0 0 10px 0 rgb(0 0 0 / 7%);
border: solid 1px #e9e9e9;
margin-bottom: 20px;
border-radius: 25px;
display: flex;
flex-direction: column;
max-height: 100%;
.schedule-header{
display: flex;
margin-bottom: 20px;
@@ -473,6 +477,18 @@ ion-toolbar{
}
@media only screen and (max-width: 856px) {
.content, .conteiner-box{
height: unset !important;
max-height: unset !important;
}
}
@media only screen and (min-width: 804px) {
.schedule:first-child {
@@ -44,7 +44,7 @@ export class DiplomaPage implements OnInit {
private location: Location,
) {
this.activatedRoute.paramMap.subscribe(params => {
console.log(params["params"]);
// console.log(params["params"]);
if(params["params"].SerialNumber) {
this.serialNumber = params["params"].SerialNumber;
@@ -51,7 +51,7 @@ export class ApproveEventPage implements OnInit {
private location: Location,
) {
this.activatedRoute.paramMap.subscribe(params => {
console.log(params["params"]);
// console.log(params["params"]);
if(params["params"].serialNumber) {
this.serialNumber = params["params"].serialNumber;
@@ -60,7 +60,7 @@ export class PedidoPage implements OnInit {
this.loggeduser = authService.ValidatedUser;
this.activatedRoute.paramMap.subscribe(params => {
console.log(params["params"]);
// console.log(params["params"]);
if(params["params"].SerialNumber) {
this.serialnumber = params["params"].SerialNumber;
@@ -33,7 +33,7 @@ export class PublicationDetailPage implements OnInit {
if(params["params"]) {
this.folderId = params["params"].folderId;
this.publicationId = params["params"].publicationId;
console.log(params["params"]);
// console.log(params["params"]);
}
});
@@ -44,7 +44,7 @@ export class ViewPublicationsPage implements OnInit {
if(params["params"]) {
this.folderId = params["params"].folderId;
console.log(params["params"]);
// console.log(params["params"]);
}
window['app-view-publications-page-doRefresh'] = this.doRefresh
@@ -0,0 +1,16 @@
import { TestBed } from '@angular/core/testing';
import { ListBoxService } from './list-box.service';
describe('ListBoxService', () => {
let service: ListBoxService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(ListBoxService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});
@@ -1,30 +1,16 @@
import { eventSource } from 'src/app/models/agenda/eventSource';
import { setHours, setMinutes } from 'date-fns';
import { CustomCalendarEvent, EventList, EventListStore } from 'src/app/models/agenda/AgendaEventList';
import { CalendarEvent } from 'angular-calendar';
import { Injectable } from '@angular/core';
import { CustomCalendarEvent, EventListStore } from 'src/app/models/agenda/AgendaEventList';
import { DateService } from '../date.service';
export class eventListBox {
constructor(){}
@Injectable({
providedIn: 'root'
})
export class ListBoxService {
EventEndDateTreatment ({startTime, endTime}) {
constructor(
private dateService: DateService
){}
const startTimeSamp = new Date(startTime).toLocaleDateString()
const endTimeSamp = new Date(endTime).toLocaleDateString()
const endMinutes = new Date(endTime).getMinutes()
const endHours = new Date(endTime).getHours()
if (startTimeSamp < endTimeSamp && (endMinutes + endHours) == 0) {
endTime = new Date(endTime);
endTime.setSeconds(endTime.getSeconds() - 1);
return new Date(endTime)
} else {
return new Date(endTime)
}
}
filterProfile(eventSource: EventListStore[], profile: 'md' | 'pr' | 'all') {
return eventSource.filter((e) => e.profile == profile)
@@ -44,6 +30,8 @@ export class eventListBox {
list(eventSource: EventListStore[], profile: 'md' | 'pr' | 'all', rangeStartDate, randEndDate, calendarDate) {
console.log('eventSource: EventListStore[]',eventSource)
if(profile != 'all') {
eventSource = this.filterProfile(eventSource, profile)
}
@@ -51,6 +39,7 @@ export class eventListBox {
eventSource = this.getEventInsideRange(eventSource, rangeStartDate, randEndDate)
let newStracture:CustomCalendarEvent[];
if(profile == 'md') {
newStracture = this.encapsulation(eventSource, 'mdgpr');
} else {
@@ -60,24 +49,23 @@ export class eventListBox {
return this.display(newStracture)
}
display(list) {
display(list: CustomCalendarEvent[]) {
let days = {};
console.log(list)
list.forEach( (event, index)=> {
list.forEach( (event:CustomCalendarEvent, index)=> {
var startDate: any = new Date(event.start);
var endDate: any = this.EventEndDateTreatment({
var endDate: any = this.dateService.EventEndDateTreatment({
startTime: startDate,
endTime: event.end
})
const day = (((new Date (event.start)).getDate())).toString().padStart(2,'0')
event.manyDays = false
event.todayOnly = new Date(event.start).toLocaleDateString() == new Date(event.end).toLocaleDateString()
event['manyDays'] = false
event['todayOnly'] = this.dateService.isSameDate(event.start, event.end)
if(!days.hasOwnProperty(day)) {
days[day] = []
@@ -85,21 +73,20 @@ export class eventListBox {
if (new Date(startDate).toLocaleDateString() != new Date(endDate).toLocaleDateString()) {
const diffTime = Math.abs(endDate - startDate);
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
const diffDays = this.dateService.deferenceBetweenDays(endDate, startDate)
if (diffDays <= 150 && !event.event.IsAllDayEvent ) {
if (diffDays >= 1) {
const StartEvent = Object.assign({}, {
title: event.title,
title: event.event.Subject,
start: event.start,
end: event.end,
color: event.color,
id: event.id,
index: event.index,
profile: event.profile,
CalendarName: event.CalendarName,
event: {
Subject: event.event.Subject,
@@ -126,7 +113,7 @@ export class eventListBox {
let otherDays = (((new Date (newDate)).getDate())).toString().padStart(2,'0')
event.other = true
event['other'] = true
event.start = newDate
if(!days.hasOwnProperty(otherDays)) {
@@ -140,13 +127,12 @@ export class eventListBox {
// last push
const EndEvent = Object.assign({}, {
title: event.title,
title: event.event.Subject,
start: event.start,
end: event.end,
color: event.color,
id: event.id,
index: event.index,
profile: event.profile,
CalendarName: event.CalendarName,
event: {
Subject: event.event.Subject,
@@ -156,7 +142,7 @@ export class eventListBox {
EventId: event.event.EventId,
CalendarName: event.event.CalendarName
},
Subject: event.Subject,
Subject: event.event.Subject,
startMany: false,
endMany: true,
middle: false
@@ -166,13 +152,13 @@ export class eventListBox {
} else {
const EndEvent = Object.assign({}, {
title: event.title,
title: event.event.Subject,
start: event.start,
end: event.end,
color: event.color,
id: event.id,
index: event.index,
profile: event.profile,
profile: event,
CalendarName: event.CalendarName,
event: {
Subject: event.event.Subject,
@@ -182,7 +168,7 @@ export class eventListBox {
EventId: event.event.EventId,
CalendarName: event.event.CalendarName
},
Subject: event.Subject,
Subject: event.event.Subject,
startMany: false,
endMany: true,
middle: true
@@ -219,7 +205,7 @@ export class eventListBox {
return days
}
encapsulation(eventsList, profile): CustomCalendarEvent[] {
encapsulation(eventsList:EventListStore[], profile): CustomCalendarEvent[] {
// remove all event
let events: CustomCalendarEvent[] = [];
@@ -245,5 +231,4 @@ export class eventListBox {
return events;
}
}
}
+16
View File
@@ -0,0 +1,16 @@
import { TestBed } from '@angular/core/testing';
import { DateService } from './date.service';
describe('DateService', () => {
let service: DateService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(DateService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});
+40
View File
@@ -0,0 +1,40 @@
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class DateService {
constructor() { }
deferenceBetweenDays(start: any, end: any) {
const diffTime = Math.abs(end - start);
return Math.ceil(diffTime / (1000 * 60 * 60 * 24));
}
notSameDate(start: any, end: any): boolean {
return new Date(start).toLocaleDateString() != new Date(end).toLocaleDateString()
}
isSameDate(start: any, end: any): boolean {
return !this.notSameDate(start, end)
}
EventEndDateTreatment({startTime, endTime}) {
const startTimeSamp = new Date(startTime).toLocaleDateString()
const endTimeSamp = new Date(endTime).toLocaleDateString()
const endMinutes = new Date(endTime).getMinutes()
const endHours = new Date(endTime).getHours()
if (startTimeSamp < endTimeSamp && (endMinutes + endHours) == 0) {
endTime = new Date(endTime);
endTime.setSeconds(endTime.getSeconds() - 1);
return new Date(endTime)
} else {
return new Date(endTime)
}
}
}
@@ -1,15 +1,18 @@
import { Injectable } from '@angular/core';
import { AlertController, Platform } from '@ionic/angular';
@Injectable({
providedIn: 'root'
})
export class WebNotificationPopupService {
constructor() { }
constructor( private platform: Platform) { }
askNotificationPermission() {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {}
else {return false}
// function to actually ask the permissions
function handlePermission(permission) {}
+10 -1
View File
@@ -40,7 +40,16 @@ export class NotificationsService {
private toastService: ToastService,
private zone: NgZone,
private activeroute: ActivatedRoute,
private jsonstore: JsonStore) { }
private jsonstore: JsonStore) {
this.storageService.get("Notifications").then((value) => {
}).catch(()=>{
this.storageService.store("Notifications",[])
})
}
registerCallback(type: string, funx: Function, object: any = {} ) {
+1 -1
View File
@@ -136,7 +136,7 @@ class SynchroService {
if(window['platform'].is('desktop') || this.platform.is('mobileweb')) {}
else return false
// if(environment.production) return false
if(environment.production) return false
this.callBacks.forEach((e)=> {
+6 -3
View File
@@ -16,9 +16,9 @@ const { Storage } = Plugins; */
private platform: Platform
) {}
key(key) {
this.keyName = (SHA1('service'+this.constructor.name+'key')).toString()
}
key(key:string): string {
return (SHA1('service'+this.constructor.name+key)).toString()
}
// Store the value
async store(key: string, value: any) {
@@ -45,6 +45,9 @@ const { Storage } = Plugins; */
try {
return JSON.parse(unescape(atob(ret)));
} catch (error) {
if(ret == 'žée') {
throw(key+' not found')
}
return unescape(atob(ret))
}
}
@@ -40,6 +40,18 @@ export class WebNotificationsService {
MFPPush.registerDevice()
.then((res) => {
console.log("WEB Successfully Registered Device...");
setTimeout(()=>{
MFPPush.registerDevice()
.then((res) => {
console.log("WEB Successfully Registered Device...");
})
.catch((err) => {
console.log("WEB Registration Failed" + err);
});
}, 1000)
})
.catch((err) => {
console.log("WEB Registration Failed" + err);
@@ -18,10 +18,11 @@ import { ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatSelectModule } from '@angular/material/select';
import { NgxMatMomentModule } from '@angular-material-components/moment-adapter';
import { MAT_DATE_LOCALE } from '@angular/material/core';
import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatInputModule } from '@angular/material/input';
import { MatDialogModule } from '@angular/material/dialog';
import { AttendeeModalPageModule } from 'src/app/shared/event/attendee-modal/attendee-modal.module';
@NgModule({
imports: [
@@ -41,6 +42,7 @@ import { MatDialogModule } from '@angular/material/dialog';
MatButtonModule,
ReactiveFormsModule,
MatDialogModule,
AttendeeModalPageModule,
],
declarations: [EditEventToApprovePage],
exports: [EditEventToApprovePage]
@@ -58,7 +58,7 @@
</div>
<div class="ion-input-class">
<ion-select disabled placeholder="Selecione agenda*"
<ion-select placeholder="Selecione agenda*"
class="d-block d-md-none"
selectedText="{{eventProcess.workflowInstanceDataFields.Agenda}}"
[(ngModel)]="eventProcess.workflowInstanceDataFields.Agenda"
@@ -280,7 +280,7 @@
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-person.svg"></ion-icon>
</div>
<div class="ion-input-class-no-height d-flex">
<div class="ion-input-class-no-height d-flex" (click)="addParticipants()">
<div class="list-people flex-grow-1">
<ion-item lines="none">
<ion-list>
@@ -289,7 +289,7 @@
</ion-list>
</ion-item>
</div>
<div class="add-people cursor-pointer" (click)="addParticipants()">
<div class="add-people cursor-pointer" >
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
</div>
</div>
@@ -301,7 +301,7 @@
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-person.svg"></ion-icon>
</div>
<div class="ion-input-class-no-height d-flex">
<div class="ion-input-class-no-height d-flex" (click)="addParticipantsCC()">
<div class="list-people flex-grow-1">
<ion-item lines="none">
<ion-list>
@@ -310,7 +310,7 @@
</ion-list>
</ion-item>
</div>
<div class="add-people cursor-pointer" (click)="addParticipantsCC()">
<div class="add-people cursor-pointer" >
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
</div>
</div>
@@ -361,6 +361,7 @@
</div>
</ion-item-sliding>
</div>
</div>
</ion-content>
@@ -132,9 +132,6 @@ export class EditEventToApprovePage implements OnInit {
ngOnInit() {
console.log('EDITAR');
if(this.restoreTemporaryData()){
this.setOtherData()
} else {
@@ -338,26 +335,6 @@ export class EditEventToApprovePage implements OnInit {
}
// setIntervenient(data){
// this.taskParticipants = data;
// this.postEvent.Attendees = data;
// }
// setIntervenientCC(data) {
// this.taskParticipantsCc = data;
// }
// addParticipants(){
// this.adding = 'intervenient'
// this.openAttendees();
// }
// addParticipantsCC(){
// this.adding = 'CC'
// this.openAttendees();
// }
dynamicSetIntervenient({taskParticipants, taskParticipantsCc}) {
this.taskParticipants = removeDuplicate(taskParticipants) ;
@@ -55,7 +55,6 @@
</div>
</div>
123123
<div class="container-div">
<div class="ion-item-class-2 width-100 d-flex">
<div class="ion-icon-class">
@@ -214,13 +213,41 @@
</div>
</div>
<!-- <div *ngIf="Form && validateFrom" >
<div *ngIf="Form.get('participantes').invalid " class="input-errror-message">
<div *ngIf="Form.get('participantes').errors?.required">
Adicionar participant.
<div class="container-div width-100">
<div class="ion-item-class-2">
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-refresh.svg"></ion-icon>
</div>
<div class="ion-input-class" [class.input-error]="Form?.get('Categories')?.invalid && validateFrom ">
<ion-select placeholder="Selecione a repetição*"
[(ngModel)]="postEvent.IsRecurring"
(ngModelChange)="onSelectedRecurringChanged($event)"
interface="action-sheet"
Cancel-text="Cancelar" required>
<ion-select-option *ngFor="let recurring of recurringTypes" value="{{recurring.Code}}">{{recurring.Description}}</ion-select-option>
</ion-select>
</div>
</div>
</div> -->
</div>
<div *ngIf="selectedRecurringType != '-1'" class="container-div width-100">
<div class="ion-item-class-2">
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
</div>
<div class="ion-input-class">
<ion-datetime
placeholder="Última ocorrência"
[(ngModel)]="postEvent.EventRecurrence.LastOccurrence"
displayFormat="DD MMM YYYY"
monthShortNames="Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez"
max="2045"
>
</ion-datetime>
<!-- <ion-input placeholder="Data fim" [(ngModel)]="postData.EndDate"></ion-input> -->
</div>
</div>
</div>
<div class=" d-flex width-100">
<div class="ion-item-class-2 width-100">
@@ -31,7 +31,9 @@ export class EditEventPage implements OnInit {
eventAttendees: EventPerson[];
// minDate: string;
loadedEventAttachments: Attachment[]=[];
recurringTypes: any;
recurringTypes = [];
selectedRecurringType: any;
public dateControlOccurrence = new FormControl(moment("DD MM YYYY hh"));
public date: any;
@@ -107,6 +109,7 @@ export class EditEventPage implements OnInit {
ngOnInit() {
this.dateControlOccurrence = new FormControl(moment(this.postEvent.EventRecurrence.LastOccurrence));
if(!this.restoreTemporaryData()) {
// clear
@@ -18,10 +18,10 @@ import { ReactiveFormsModule } from '@angular/forms';
import { MatButtonModule } from '@angular/material/button';
import { MatSelectModule } from '@angular/material/select';
import { NgxMatMomentModule } from '@angular-material-components/moment-adapter';
import { MAT_DATE_LOCALE } from '@angular/material/core';
import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatInputModule } from '@angular/material/input';
import { MatDialogModule } from '@angular/material/dialog';
import { AttendeeModalPageModule } from 'src/app/shared/event/attendee-modal/attendee-modal.module';
@NgModule({
imports: [
@@ -41,6 +41,7 @@ import { MatDialogModule } from '@angular/material/dialog';
MatButtonModule,
ReactiveFormsModule,
MatDialogModule,
AttendeeModalPageModule,
],
declarations: [
EditEventToApproveComponent
@@ -8,7 +8,7 @@
<ion-header>
<div class="title-content">
<div class="middle">
<ion-label class="title">Editar evento por aprovar</ion-label>
<ion-label class="title">Editar evento por aprovar gg</ion-label>
</div>
</div>
</ion-header>
@@ -68,13 +68,12 @@
</div>
</div>
<div class="container-div width-100">
<div class="ion-item-class-2">
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
</div>
<div class="ion-input-class" [class.input-error]="Form?.get('Categories')?.invalid && validateFrom ">
<div class="ion-input-class">
<ion-select placeholder="Selecione tipo de evento*"
class="d-block d-md-none"
@@ -291,12 +290,12 @@
</div>
</div>
<div class="container-div width-100">
<div class="container-div width-100" >
<div class="ion-item-class-2">
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-person.svg"></ion-icon>
</div>
<div class="ion-input-class-no-height d-flex">
<div class="ion-input-class-no-height d-flex" (click)="addParticipantsCC()">
<div class="list-people flex-grow-1">
<ion-item lines="none">
<ion-list>
@@ -305,7 +304,7 @@
</ion-list>
</ion-item>
</div>
<div class="add-people cursor-pointer" (click)="addParticipantsCC()">
<div class="add-people cursor-pointer" >
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
</div>
</div>
@@ -259,7 +259,6 @@ export class EditEventToApproveComponent implements OnInit {
Category: this.eventProcess.workflowInstanceDataFields.Category
}
console.log(event);
this.eventsService.postEventToApproveEdit(event).subscribe(()=>{
this.toastService.successMessage('Evento editado');
@@ -342,7 +341,6 @@ export class EditEventToApproveComponent implements OnInit {
addParticipants(){
this.adding = 'intervenient'
this.openAttendees();
console.log('LOGS');
}
-2
View File
@@ -70,8 +70,6 @@ export class HeaderPage implements OnInit {
this.storageservice.get("Notifications").then((value) => {
console.log("Init get store", value)
if(value == 'žée') return false
/* var data = JSON.parse(value); */
this.notificationLength = value.length;
})
+4 -4
View File
@@ -14,11 +14,11 @@ export class LocalstoreService {
this.set(key, this.prefix)
}
getKey(keyName) {
getKey(keyName:string) {
return this.prefix + keyName
}
get( keyName, safe) {
get( keyName:string, safe) {
keyName = this.getKey(keyName)
@@ -40,7 +40,7 @@ export class LocalstoreService {
}
}
set(keyName, value) {
set(keyName:string, value) {
keyName = this.getKey(keyName)
@@ -55,7 +55,7 @@ export class LocalstoreService {
localStorage.setItem(keyName, encoded)
}
delete(keyName) {
delete(keyName:string) {
keyName = this.getKey(keyName)
localStorage.removeItem(keyName)