remove unused imports

This commit is contained in:
Peter Maquiran
2022-10-12 17:01:09 +01:00
parent de16765d97
commit 959bb53b82
59 changed files with 116 additions and 277 deletions
+9 -9
View File
@@ -21,7 +21,7 @@
<div>
<!-- Calendar is here -->
<div class="calendar-segment-{{profile}}" [class.calendar-segment-pr-force]="loggeduser.Profile =='PR'">
<div class="calendar-segment-{{profile}}" [class.calendar-segment-pr-force]="SessionStore.user.Profile =='PR'">
<div class="calendar-container" [style.height]="calendarHeight ">
<ion-row class="ion-justify-content-between calendar-tool-tip">
@@ -103,7 +103,7 @@
</ion-row>
<ion-row class="ion-align-items-center">
<div class="calendar-letters cal-reverse" *ngIf="loggeduser.Profile != 'PR' && loggeduser.Profile != 'MDGPR' && eventService.calendarIds.length >= 2" class="calendar-letters" [class.cal-reverse]="loggeduser.Profile != 'PR' && loggeduser.Profile != 'MDGPR' && profile == 'mdgpr' " (click)="changeProfile()">
<div class="calendar-letters cal-reverse" *ngIf="SessionStore.user.Profile != 'PR' && SessionStore.user.Profile != 'MDGPR' && eventService.calendarIds.length >= 2" class="calendar-letters" [class.cal-reverse]="SessionStore.user.Profile != 'PR' && SessionStore.user.Profile != 'MDGPR' && profile == 'mdgpr' " (click)="changeProfile()">
<div class="text" *ngIf="profile == 'mdgpr'">
MC
</div>
@@ -114,11 +114,11 @@
</div>
<button *ngIf="profile == 'mdgpr' && ( loggeduser.Profile == 'PR' || loggeduser.Profile == 'MDGPR') " (click)="changeProfile()" class="d-md-none btn-no-color resize">
<button *ngIf="profile == 'mdgpr' && ( SessionStore.user.Profile == 'PR' || SessionStore.user.Profile == 'MDGPR') " (click)="changeProfile()" class="d-md-none btn-no-color resize">
<ion-icon class="right-icons" src="assets/images/icons-profile-calendar-md.svg"></ion-icon>
</button>
<button title="Mudar de Agenda" *ngIf="profile == 'pr'&& ( loggeduser.Profile == 'PR' || loggeduser.Profile == 'MDGPR')" (click)="changeProfile()" class="btn-no-color resize">
<button title="Mudar de Agenda" *ngIf="profile == 'pr'&& ( SessionStore.user.Profile == 'PR' || SessionStore.user.Profile == 'MDGPR')" (click)="changeProfile()" class="btn-no-color resize">
<ion-icon class="right-icons d-md-none" src="assets/images/icons-profile-calendar-pr.svg"></ion-icon>
</button>
@@ -226,13 +226,13 @@
</ion-row>
</ion-row>
<div class="calendar-title-container px-20 d-none d-md-flex" *ngIf="loggeduser.Profile == 'MDGPR'">
<div class="calendar-title-container px-20 d-none d-md-flex" *ngIf="SessionStore.user.Profile == 'MDGPR'">
<div class="calendar-title-description flex-grow-1 text-grey d-flex justify-center align-center">
<div *ngIf="loggeduser.Profile == 'PR' || loggeduser.Profile == 'MDGPR'">Meu Calendário</div>
<div *ngIf="SessionStore.user.Profile == 'PR' || SessionStore.user.Profile == 'MDGPR'">Meu Calendário</div>
</div>
<div class="calendar-title-description text-black align-center">
<div class="flex-grow-1 text-grey d-flex justify-center align-center">
<div *ngIf="loggeduser.Profile == 'PR' || loggeduser.Profile == 'MDGPR'">Calendário Partilhado</div>
<div *ngIf="SessionStore.user.Profile == 'PR' || SessionStore.user.Profile == 'MDGPR'">Calendário Partilhado</div>
</div>
</div>
</div>
@@ -291,7 +291,7 @@
</div>
</div>
<div class="fs-timeline flex-grow-1 d-none d-md-block d-md-block text-black pr-20 width-100 height-100 overflow-y-auto" *ngIf="loggeduser.OwnerCalendars.length && loggeduser.Profile != 'PR' ">
<div class="fs-timeline flex-grow-1 d-none d-md-block d-md-block text-black pr-20 width-100 height-100 overflow-y-auto" *ngIf="SessionStore.user.OwnerCalendars.length && SessionStore.user.Profile != 'PR' ">
<div *ngFor="let events of TimelineMDList | keyvalue;" >
<div class="EventListBox-container" >
@@ -332,7 +332,7 @@
</div>
</div>
<div class="sd-timeline flex-grow-1 d-none d-md-block timeline-md text-black pl-20 pr-20 width-100 height-100 overflow-y-auto" *ngIf="loggeduser.SharedCalendars.length != 0 || loggeduser.Profile == 'PR' " >
<div class="sd-timeline flex-grow-1 d-none d-md-block timeline-md text-black pl-20 pr-20 width-100 height-100 overflow-y-auto" *ngIf="SessionStore.user.SharedCalendars.length != 0 || SessionStore.user.Profile == 'PR' " >
<div *ngFor="let events of TimelinePRList | keyvalue;">
<div class="EventListBox-container" >
+4 -10
View File
@@ -1,15 +1,14 @@
import { Component, OnInit, ViewChild, Inject, LOCALE_ID } from '@angular/core';
import { CalendarComponent } from 'ionic2-calendar';
import { AlertController, ModalController, Platform } from '@ionic/angular';
import { ModalController, Platform } from '@ionic/angular';
import { EventsService } from 'src/app/services/events.service';
import { Event } from '../../models/event.model';
import { Router, NavigationEnd, NavigationExtras } from '@angular/router';
import { momentG } from 'src/plugin/momentG';
import { DomSanitizer } from "@angular/platform-browser";
import { EventPerson } from 'src/app/models/eventperson.model';
import { removeDuplicate } from 'src/plugin/removeDuplicate.js';
import { Storage } from '@ionic/storage';
import { environment } from 'src/environments/environment';
// showTimeline
import { setHours, setMinutes } from 'date-fns';
@@ -21,7 +20,6 @@ import {
} from 'angular-calendar';
import { CustomDateFormatter } from './custom-date-formatter.provider';
import { NewEventPage } from './new-event/new-event.page';
import { AuthService } from 'src/app/services/auth.service';
import { LoginUserRespose } from 'src/app/models/user.model';
import { DateAdapter } from '@angular/material/core';
import { ToastService } from 'src/app/services/toast.service';
@@ -36,7 +34,6 @@ import { ThemeService } from 'src/app/services/theme.service'
import { SessionStore } from 'src/app/store/session.service';
import { PermissionService } from 'src/app/services/permission.service';
@Component({
selector: 'app-agenda',
templateUrl: './agenda.page.html',
@@ -167,17 +164,14 @@ export class AgendaPage implements OnInit {
listToPresent
array = []
sessionStore = SessionStore;
SessionStore = SessionStore;
environment
constructor(
private alertCtrl: AlertController,
@Inject(LOCALE_ID) private locale: string,
private modalCtrl: ModalController,
public eventService: EventsService,
private router: Router,
private sanitizer: DomSanitizer,
authService: AuthService,
private dateAdapter: DateAdapter<any>,
private toastService: ToastService,
private listBoxService: ListBoxService,
@@ -193,7 +187,7 @@ export class AgendaPage implements OnInit {
this.dateAdapter.setLocale('es');
this.locale = 'pt'
this.loggeduser = authService.ValidatedUser;
this.loggeduser = SessionStore.user;
this.changeProfileService.registerCallback(() => {
this.tigerUpdate()
@@ -17,6 +17,7 @@ import { FormControl, FormGroup, Validators } from '@angular/forms';
import { ThemeService } from 'src/app/services/theme.service';
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
import { SessionStore } from 'src/app/store/session.service';
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
parse: {
@@ -91,10 +92,9 @@ export class NewEventPage implements OnInit {
public eventService: EventsService,
private attachmentsService: AttachmentsService,
private toastService: ToastService,
userService: AuthService,
public ThemeService: ThemeService
) {
this.loggeduser = userService.ValidatedUser;
this.loggeduser = SessionStore.user;
this.postEvent = new Event();
this.postEvent.EventRecurrence = {Type:'-1'};
this.eventBody = { BodyType : "1", Text : ""};