mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
Edit event show attachment
This commit is contained in:
@@ -187,30 +187,35 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div hidden class="ion-item-container-no-border">
|
||||
<div class="d-flex container-div width-100 ion-item-container-no-border" >
|
||||
<ion-label>
|
||||
<div class="attach-icon">
|
||||
<ion-icon src="assets/images/icons-attach-doc.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="attach-document">
|
||||
<ion-label>Anexar Documentos</ion-label>
|
||||
<ion-label>Adicionar documentos</ion-label>
|
||||
</div>
|
||||
</ion-label>
|
||||
</div>
|
||||
|
||||
<div hidden>
|
||||
<ion-item>
|
||||
<ion-label>Documentos Anexados</ion-label>
|
||||
</ion-item>
|
||||
<ion-list>
|
||||
<ion-item>
|
||||
<ion-label>
|
||||
<h4 class="attach-title-item">Text</h4>
|
||||
<p><span class="span-left">Text</span><span class="span-right"> Text </span></p>
|
||||
<div class="d-flex container-div width-100" *ngFor="let document of loadedEventAttachments" >
|
||||
<ion-list class="width-100">
|
||||
<ion-item class="width-100">
|
||||
<ion-label class="width-100">
|
||||
<p class="d-flex ion-justify-content-between">
|
||||
<span class="attach-title-item">{{document.SourceName}}</span>
|
||||
<span class="app-name" *ngIf="document.Source == 1"> webTRIX</span>
|
||||
<span class="app-name" *ngIf="document.Source == 2"> K2</span>
|
||||
<span class="app-name" *ngIf="document.Source == 3"> Exchange</span>
|
||||
<span class="app-name" *ngIf="document.Source == 4"> File</span>
|
||||
|
||||
</p>
|
||||
<p><span class="span-left">{{document.Stakeholders}}</span><span class="span-right"> {{document.CreateDate}} </span></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ion-content>
|
||||
<ion-footer class="ion-no-border">
|
||||
|
||||
@@ -167,4 +167,22 @@ ion-content{
|
||||
color:red;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.app-name{
|
||||
background: #42b9f2;
|
||||
border-radius: 18px;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0px 5px;
|
||||
color: white;
|
||||
font-size: 9pt;
|
||||
font-weight: 500;
|
||||
height: 19px;
|
||||
-webkit-border-radius: 18px;
|
||||
-moz-border-radius: 18px;
|
||||
-ms-border-radius: 18px;
|
||||
-o-border-radius: 18px;
|
||||
}
|
||||
@@ -7,6 +7,8 @@ import { Event } from 'src/app/models/event.model';
|
||||
import { AlertController } from '@ionic/angular';
|
||||
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
|
||||
import { SearchPage } from 'src/app/pages/search/search.page';
|
||||
import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { Attachment } from 'src/app/models/attachment.model';
|
||||
@Component({
|
||||
selector: 'app-edit-event',
|
||||
templateUrl: './edit-event.component.html',
|
||||
@@ -22,6 +24,7 @@ export class EditEventComponent implements OnInit {
|
||||
segment:string = "true";
|
||||
eventAttendees: EventPerson[];
|
||||
minDate: string;
|
||||
loadedEventAttachments: Attachment[];
|
||||
|
||||
@Input() taskParticipants: EventPerson[];
|
||||
@Input() taskParticipantsCc: EventPerson[];
|
||||
@@ -41,8 +44,11 @@ export class EditEventComponent implements OnInit {
|
||||
private modalController: ModalController,
|
||||
private eventsService: EventsService,
|
||||
public alertController: AlertController,
|
||||
private attachmentsService: AttachmentsService,
|
||||
|
||||
) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -50,8 +56,14 @@ export class EditEventComponent implements OnInit {
|
||||
if(!this.restoreTemporaryData()){
|
||||
|
||||
if(this.postEvent){
|
||||
this.postEvent.Body.Text = this.postEvent.Body.Text.replace(/<[^>]+>/g, '');
|
||||
if( this.postEvent.Body){
|
||||
if(typeof(this.postEvent.Body.Text) == 'string'){
|
||||
this.postEvent.Body.Text = this.postEvent.Body.Text.replace(/<[^>]+>/g, '');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// attendees list
|
||||
if(this.postEvent.Attendees != null) {
|
||||
@@ -79,6 +91,10 @@ export class EditEventComponent implements OnInit {
|
||||
this.isRecurring = "Repete";
|
||||
}
|
||||
}
|
||||
|
||||
this.getAttachments(this.postEvent.EventId);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -155,15 +171,22 @@ export class EditEventComponent implements OnInit {
|
||||
this.eventBody = restoredData.eventBody
|
||||
this.segment = restoredData.segment
|
||||
|
||||
return true;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
deleteTemporaryData(){
|
||||
window['temp.path:/home/agenda/edit-event.component.ts'] = {}
|
||||
}
|
||||
|
||||
getAttachments(eventId: string){
|
||||
this.attachmentsService.getAttachmentsById(eventId).subscribe(res=>{
|
||||
this.loadedEventAttachments = res;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -32,6 +32,8 @@ export class ViewEventPage implements OnInit {
|
||||
months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
|
||||
days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"];
|
||||
|
||||
documents: Attachment[] = [];
|
||||
|
||||
@Input() profile:string;
|
||||
@Input() eventId: string;
|
||||
|
||||
@@ -76,12 +78,15 @@ export class ViewEventPage implements OnInit {
|
||||
loadEvent(){
|
||||
this.eventsService.getEvent(this.eventId).subscribe(res => {
|
||||
this.loadedEvent = res;
|
||||
console.log(res);
|
||||
// console.log(res);
|
||||
this.today = new Date(res.StartDate);
|
||||
console.log(new Date(this.today));
|
||||
// console.log(new Date(this.today));
|
||||
this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]);
|
||||
this.getAttachments(this.loadedEvent.EventId);
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
deleteEvent(){
|
||||
this.eventsService.deleteEvent(this.loadedEvent.EventId, 0).subscribe(async () =>
|
||||
|
||||
Reference in New Issue
Block a user