mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
fix create event from viewer
This commit is contained in:
@@ -117,14 +117,45 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
||||
this.document = this.navParams.get('document')
|
||||
|
||||
if(Array.isArray(this.document)) {
|
||||
this.attachments = this.document
|
||||
const E = this.document
|
||||
this.document = []
|
||||
E.forEach((e)=> {
|
||||
this.document.push({
|
||||
ApplicationId: e.ApplicationId || e.ApplicationType,
|
||||
Source: 1,
|
||||
SourceId: e.DocId || e.docID || e.docId || e.SourceId || e.Id,
|
||||
SourceName: e.Assunto || e.attachments,
|
||||
DocDate: e.CreateDate,
|
||||
Data: e.Data,
|
||||
Assunto: e.Description,
|
||||
...e
|
||||
})
|
||||
})
|
||||
} else if (this.document) {
|
||||
|
||||
const E = this.document
|
||||
this.document = []
|
||||
this.document.push({
|
||||
ApplicationId: E.ApplicationId || E.ApplicationType,
|
||||
Source: 1,
|
||||
SourceId: E.DocId || E.docID || E.docId || E.SourceId || E.Id,
|
||||
SourceName: E.Assunto || E.attachments,
|
||||
DocDate: E.CreateDate,
|
||||
Data: E.Data,
|
||||
Assunto: E.Description,
|
||||
...E
|
||||
})
|
||||
} else {
|
||||
this.attachments = [this.document]
|
||||
this.document = []
|
||||
}
|
||||
|
||||
|
||||
|
||||
this.document = []
|
||||
if(Array.isArray(this.document)) {
|
||||
this.attachments = this.document
|
||||
} else {
|
||||
this.attachments = [this.document]
|
||||
}
|
||||
|
||||
this.subject = this.navParams.get('subject')
|
||||
|
||||
@@ -277,25 +308,6 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
||||
|
||||
let Attendees = this.taskParticipants.concat(this.taskParticipantsCc);
|
||||
|
||||
if(this.document.Documents) {
|
||||
this.document.Documents.forEach((e)=> {
|
||||
this.docs.push({
|
||||
ApplicationId: e.ApplicationId || e.ApplicationType,
|
||||
Source: 1,
|
||||
SourceId: e.DocId || e.docID || e.docId || e.SourceId || e.Id,
|
||||
SourceName: e.Assunto
|
||||
})
|
||||
})
|
||||
}
|
||||
else{
|
||||
this.docs.push({
|
||||
ApplicationId: this.document.ApplicationId || this.document.ApplicationType,
|
||||
Source: 1,
|
||||
SourceId: this.document.DocId || this.document.docID || this.document.docId || this.document.SourceId || this.document.Id,
|
||||
SourceName: this.document.Assunto
|
||||
})
|
||||
}
|
||||
|
||||
let postEvent = {
|
||||
EventId: '',
|
||||
Subject: this.postData.Subject,
|
||||
@@ -318,10 +330,11 @@ export class DocumentSetUpMeetingPage implements OnInit {
|
||||
Type: this.EventRecurrenceType,
|
||||
LastOccurrence: this.Occurrence,
|
||||
},
|
||||
// Attachments: this.docs,
|
||||
Attachments: this.attachments,
|
||||
}
|
||||
|
||||
const laoder = this.toastService.loading()
|
||||
const laoder = this.toastService.loading();
|
||||
|
||||
|
||||
this.eventService.create({ body: postEvent, calendar: this.postData.CalendarName }).subscribe(async (respose) => {
|
||||
laoder.remove();
|
||||
|
||||
+10
-10
@@ -17,7 +17,7 @@
|
||||
<div *ngIf="Form && validateFrom" >
|
||||
<div *ngIf="Form.get('Subject').invalid " class="input-errror-message">
|
||||
<div *ngIf="Form.get('Subject').errors?.required">
|
||||
|
||||
|
||||
</div>
|
||||
<div *ngIf="Form.get('Subject').errors?.minlength">
|
||||
O campo deve ter pelo menos 4 caracteres.
|
||||
@@ -34,12 +34,12 @@
|
||||
|
||||
<mat-form-field appearance="none" class="width-100" color="ion-color-secondary" placeholder="Selecione agenda">
|
||||
<mat-select [(value)]="CalendarName" (selectionChange)="changeAgenda()">
|
||||
|
||||
|
||||
<!-- <mat-option *ngFor="let calendars of _eventService.calendarNamesAry; let i = index" value="{{calendars}}">
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars == 'Presidente da República'"> {{ environment.agendaPR}} </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars == 'Ministro e Director do Gabinete do PR'"> {{ environment.agendaVP}} </div>
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars != 'Ministro e Director do Gabinete do PR' && calendars != 'Presidente da República'"> Agenda do {{calendars}} </div>
|
||||
|
||||
|
||||
<div *ngIf="calendars == 'Meu calendario'"> Minha agenda </div> -->
|
||||
<mat-option *ngFor="let calendars of eventService.calendarNamesAry" value="{{ calendars.Fullname || calendars}}">
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role == 'Presidente da República'"> {{ environment.agendaPR}} </div>
|
||||
@@ -47,7 +47,7 @@
|
||||
<div *ngIf="calendars != 'Meu calendario' && calendars.Role != 'Ministro e Director do Gabinete do PR' && calendars.Role != 'Presidente da República'"> Agenda do {{calendars.Fullname}} </div>
|
||||
<div *ngIf="calendars == 'Meu calendario'"> Minha agenda </div>
|
||||
</mat-option>
|
||||
|
||||
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
@@ -72,16 +72,16 @@
|
||||
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
|
||||
</div>
|
||||
<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)]="postData.CalendarName" >
|
||||
<mat-option *ngFor="let calendars of CalendarNamesOptions" value="{{calendars}}">
|
||||
Agenda {{ calendars }}
|
||||
</mat-option>
|
||||
|
||||
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -195,7 +195,7 @@
|
||||
[stepHour]="stepHour" [stepMinute]="stepMinute"
|
||||
[stepSecond]="stepSecond"
|
||||
[touchUi]="touchUi"
|
||||
|
||||
|
||||
>
|
||||
</ngx-mat-datetime-picker>
|
||||
</mat-form-field>
|
||||
@@ -232,7 +232,7 @@
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-people-cc.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class-no-height">
|
||||
<div class="ion-input-class-no-height cursor-pointer" (click)="addParticipantsCc()">
|
||||
<div class="list-people">
|
||||
<ion-item lines="none">
|
||||
<ion-list>
|
||||
@@ -241,7 +241,7 @@
|
||||
</ion-list>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div class="add-people" (click)="addParticipantsCc()">
|
||||
<div class="add-people" >
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="start" src="assets/images/theme/gov/icons-arrow-forward.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " slot="start" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-arrow-forward.svg"></ion-icon>
|
||||
|
||||
@@ -4,4 +4,4 @@ import { doneITDev } from './suport/doneIt'
|
||||
import { DevDev } from './suport/dev'
|
||||
|
||||
|
||||
export const environment: Environment = oaprDev
|
||||
export const environment: Environment = DevDev
|
||||
|
||||
Reference in New Issue
Block a user