commit para fazer test

This commit is contained in:
Eudes Inácio
2022-04-13 22:39:08 +01:00
8 changed files with 192 additions and 101 deletions
+4 -4
View File
@@ -104,7 +104,7 @@
<ion-row class="ion-align-items-center">
<!-- <div *ngIf="loggeduser.Profile != 'PR' && loggeduser.Profile != 'MDGPR'" class="calendar-letters"> -->
<div class="calendar-letters cal-reverse" *ngIf="loggeduser.Profile != 'PR' && loggeduser.Profile != 'MDGPR' && eventService.calendarOwnerIds.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="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="text" *ngIf="profile == 'mdgpr'">
{{ sessionStore.getInitials }}
</div>
@@ -116,11 +116,11 @@
</div>
<button *ngIf="profile == 'mdgpr' && eventService.calendarOwnerIds.length >= 2 && ( loggeduser.Profile == 'PR' || loggeduser.Profile == 'MDGPR') " (click)="changeProfile()" class="d-md-none btn-no-color resize">
<button *ngIf="profile == 'mdgpr' && eventService.calendarIds.length >= 2 && ( loggeduser.Profile == 'PR' || loggeduser.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'&& eventService.calendarOwnerIds.length >= 2 && ( loggeduser.Profile == 'PR' || loggeduser.Profile == 'MDGPR')" (click)="changeProfile()" class="btn-no-color resize">
<button title="Mudar de Agenda" *ngIf="profile == 'pr'&& eventService.calendarIds.length >= 2 && ( loggeduser.Profile == 'PR' || loggeduser.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>
@@ -294,7 +294,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="eventService.calendarOwnerIds.length >= 2">
<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="eventService.calendarIds.length >= 2">
<div *ngFor="let events of TimelineMDList | keyvalue;" >
<div class="EventListBox-container" >
+1 -1
View File
@@ -208,7 +208,7 @@ export class AgendaPage implements OnInit {
} else if (this.loggeduser.Profile == 'PR') {
this.profile = "pr";
} else {
if(this.eventService.calendarOwnerIds.length >= 2) {
if(this.eventService.calendarIds.length >= 2) {
this.profile = "mdgpr";
} else if (this.eventService.hasOwnCalendar) {
this.profile = "mdgpr";
+2 -2
View File
@@ -94,7 +94,7 @@
</div>
</div>
</ion-item-sliding>
<ion-item-sliding *ngIf=" wsChatMethodsService.dmCount < 1">
<ion-item-sliding *ngIf="wsChatMethodsService.loadingWholeList == true">
<div *ngFor="let n of numSequence(8); let i = index;" class="item item-hover width-100 d-flex ion-no-padding ion-no-margin">
<div class="item-icon"><ion-icon class="icon" slot="start" src="assets/icon/icons-chat-grey.svg"></ion-icon></div>
<div class="item-content flex-grow-1 cursor-pointer">
@@ -150,7 +150,7 @@
</div>
</div>
</ion-item-sliding>
<ion-item-sliding *ngIf="wsChatMethodsService.groupCount < 1">
<ion-item-sliding *ngIf="wsChatMethodsService.loadingWholeList == true">
<div *ngFor="let n of numSequence(8); let i = index;" class="item item-hover width-100 d-flex ion-no-padding ion-no-margin">
<div class="item-icon"><ion-icon class="icon" slot="start" src="assets/icon/icons-group-chat-grey.svg"></ion-icon></div>
<div class="item-content flex-grow-1 cursor-pointer">
@@ -140,7 +140,7 @@
</ion-item>
</div>
<div class="audio-contentainer" *ngIf="msg.file.type == 'application/audio' && file.title_link">
<audio [src]="file.title_link|safehtml" preload="metadata" class="d-flex width-100" controls
<audio [src]="file.title_link | safehtml" preload="metadata" class="d-flex width-100" controls
controlsList="nodownload noplaybackrate"></audio>
</div>
<div class="file-details-optional add-attachment-bg-color">
@@ -24,6 +24,8 @@
</div>
</div>
<div class="container-div width-100">
<div class="ion-item-class-2 width-100">
<div class="ion-icon-class">
@@ -35,16 +37,29 @@
</div>
</div>
<!-- <div *ngIf="Form && validateFrom" >
<div *ngIf="Form.get('Location').invalid " class="input-errror-message">
<div *ngIf="Form.get('Location').errors?.required">
Campo obrigatório.
<div class="container-div" *ngIf="calendarService.hasOwnCalendar == true && calendarService.hasSharedCalendar == true" >
<div class="ion-item-class-2 d-flex">
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
</div>
<div *ngIf="Form.get('Location').errors?.minlength">
O campo deve ter pelo menos 4 caracteres.
<div class="ion-input-class flex-grow-1 justify-center align-center material-inputs " [class.input-error]="Form?.get('CalendarName')?.invalid && validateFrom ">
<mat-form-field appearance="none" class="width-100" color="ion-color-secondary" placeholder="Selecione agenda">
<mat-select [(value)]="CalendarName" >
<!-- <mat-select [(value)]="postEvent.CalendarName" > -->
<mat-option value="myCalendar">
Meu Calendário
</mat-option>
<mat-option value="sharedCalendar">
Calendário de {{ sessionStore.user.ManagerName}}
</mat-option>
</mat-select>
</mat-form-field>
</div>
</div>
</div> -->
</div>
<div class="container-div">
<div class="ion-item-class-2">
@@ -20,6 +20,7 @@ import * as _rollupMoment from 'moment';
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
import { ThemeService } from 'src/app/services/theme.service'
import { SessionStore } from 'src/app/store/session.service';
const moment = _rollupMoment || _moment;
@@ -117,23 +118,26 @@ export class BookMeetingModalPage implements OnInit {
loggeduser: LoginUserRespose;
emptyTextDescription = "Sem intervenientes selecionados";
CalendarName: 'myCalendar' | 'sharedCalendar' = 'myCalendar'
sessionStore = SessionStore;
constructor(
private modalController: ModalController,
private router:Router,
private navParams: NavParams,
private processes:ProcessesService,
private attachmentsService: AttachmentsService,
private calendarService: EventsService,
public calendarService: EventsService,
authService: AuthService,
private toastService: ToastService,
private activatedRoute: ActivatedRoute,
public ThemeService: ThemeService
public ThemeService: ThemeService,
) {
this.taskParticipants = [];
this.loggeduser = authService.ValidatedUser;
this.task = this.navParams.get('task');
console.log(this.task)
this.postData = new Event();
this.eventBody = { BodyType : "1", Text : ""};
this.postData.Body = this.eventBody;
@@ -145,11 +149,23 @@ export class BookMeetingModalPage implements OnInit {
this.dateControlEnd = new FormControl(moment(new Date(new Date().getTime() + 15 * 60000)));
this.postData.Category = 'Reunião'
if(this.calendarService.hasOwnCalendar == false || !this.calendarService.hasSharedCalendar == false) {
if(this.calendarService.hasOwnCalendar == false && this.calendarService.hasSharedCalendar == true) {
this.CalendarName = 'sharedCalendar'
} else if (this.calendarService.hasOwnCalendar == true && this.calendarService.hasSharedCalendar == false) {
this.CalendarName = 'myCalendar'
}
}
}
ngOnInit() {
this.adding = "intervenient";
console.log(this.task);
this.getAttachments();
this.setDefaultTime()
this.getRecurrenceTypes();
@@ -262,19 +278,12 @@ export class BookMeetingModalPage implements OnInit {
if(this.task.FsId == '8') {
const loader = this.toastService.loading()
try {
switch (this.loggeduser.Profile) {
case 'MDGPR':
await this.calendarService.postExpedientEvent(this.task.DocId, this.postData, "md",this.task.SerialNumber, this.task.FsId).toPromise();
break;
case 'PR':
await this.calendarService.postExpedientEvent(this.task.DocId, this.postData, "pr",this.task.SerialNumber, this.task.FsId).toPromise()
break;
}
await this.calendarService.genericPostExpedientEvent(this.task.DocId, this.postData, "",this.task.SerialNumber, this.task.FsId, this.CalendarName).toPromise();
this.modalController.dismiss();
// this.distartExpedientModal();
this.toastService._successMessage('Reunião criada');
} catch (error) {
@@ -290,15 +299,9 @@ export class BookMeetingModalPage implements OnInit {
const loader = this.toastService.loading()
try {
switch (this.loggeduser.Profile) {
case 'MDGPR':
await this.calendarService.createTaskEvent(this.task.FolderID | this.task.FolderId, this.postData, "md",this.task.SerialNumber, this.task.FsId).toPromise();
break;
case 'PR':
await this.calendarService.createTaskEvent(this.task.FolderID | this.task.FolderId, this.postData, "pr",this.task.SerialNumber, this.task.FsId).toPromise();
break;
}
await this.calendarService.genericCreateTaskEvent(this.task.FolderID | this.task.FolderId, this.postData, "",this.task.SerialNumber, this.task.FsId, this.CalendarName).toPromise();
this.close();
this.toastService._successMessage('Reunião criada');