mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
save
This commit is contained in:
@@ -40,6 +40,9 @@ export class EditEventPage implements OnInit {
|
||||
) {
|
||||
this.isEventEdited = false;
|
||||
this.postEvent = this.navParams.get('event');
|
||||
if(this.postEvent){
|
||||
this.postEvent.Body.Text = this.postEvent.Body.Text.replace(/<[^>]+>/g, '');
|
||||
}
|
||||
|
||||
this.taskParticipants = [];
|
||||
this.taskParticipantsCc = [];
|
||||
@@ -62,7 +65,7 @@ export class EditEventPage implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
|
||||
window.onresize = (event) => {
|
||||
// if not mobile remove all component
|
||||
if( window.innerWidth >= 800){
|
||||
|
||||
@@ -52,21 +52,22 @@
|
||||
<div class="line"></div>
|
||||
<div class="middle-content">
|
||||
<div *ngIf="loadedEvent.Attendees">
|
||||
<h5>Intervenientes</h5>
|
||||
<ion-item class="ion-no-margin ion-no-padding">
|
||||
<ion-label>
|
||||
<div *ngFor="let attendee of loadedEvent.Attendees">
|
||||
<p>{{attendee.Name}}</p>
|
||||
</div>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div *ngIf="loadedEvent.Body.Text">
|
||||
<h5>Detalhes</h5>
|
||||
<ion-item class="ion-no-margin ion-no-padding">
|
||||
<textarea disabled class="width-100" [innerHTML]="loadedEvent.Body.Text" rows="6"></textarea>
|
||||
</ion-item>
|
||||
</div>
|
||||
<h5>Intervenientes</h5>
|
||||
<ion-item class="ion-no-margin ion-no-padding">
|
||||
<ion-label>
|
||||
<div *ngFor="let attendee of loadedEvent.Attendees">
|
||||
<p>{{attendee.Name}}</p>
|
||||
</div>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div *ngIf="loadedEvent.Body.Text">
|
||||
<h5>Detalhes</h5>
|
||||
<ion-item lines="none" class="ion-no-margin ion-no-padding">
|
||||
<div disabled class="width-100" [innerHTML]="loadedEvent.Body.Text" rows="6"></div>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="loadedAttachments" class="bottom-content width-100">
|
||||
|
||||
@@ -3,7 +3,8 @@ import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { AuthService } from '../services/auth.service';
|
||||
import { User } from '../models/user.model';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Observable, throwError } from 'rxjs';
|
||||
import { catchError } from 'rxjs/operators'
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -80,7 +81,8 @@ export class PublicationsService {
|
||||
headers: this.headers,
|
||||
params: params
|
||||
};
|
||||
return this.http.get<any>(`${geturl}`, options);
|
||||
return this.http.get<any>(`${geturl}`, options)
|
||||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
|
||||
GetPublicationById( publicationId:any){
|
||||
@@ -140,6 +142,12 @@ export class PublicationsService {
|
||||
|
||||
|
||||
|
||||
handleError(error){
|
||||
return throwError(error || 'Server Error');
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -39,14 +39,15 @@ export class EditEventComponent implements OnInit {
|
||||
private modalController: ModalController,
|
||||
private eventsService: EventsService,
|
||||
public alertController: AlertController,
|
||||
) {
|
||||
|
||||
|
||||
)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
let innerHtml :string = this.postEvent.Body.Text;
|
||||
this.postEvent.Body.Text = innerHtml;
|
||||
if(this.postEvent){
|
||||
this.postEvent.Body.Text = this.postEvent.Body.Text.replace(/<[^>]+>/g, '');
|
||||
}
|
||||
console.log(this.postEvent);
|
||||
|
||||
this.isEventEdited = false;
|
||||
|
||||
@@ -44,10 +44,12 @@
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</div>
|
||||
<h5>Detalhes</h5>
|
||||
<ion-item lines="none" class="ion-no-margin ion-no-padding">
|
||||
<ion-textarea [innerHTML]="loadedEvent.Body.Text"></ion-textarea>
|
||||
</ion-item>
|
||||
<div *ngIf="loadedEvent.Body.Text">
|
||||
<h5>Detalhes</h5>
|
||||
<ion-item lines="none" class="ion-no-margin ion-no-padding">
|
||||
<div [innerHTML]="loadedEvent.Body.Text"></div>
|
||||
</ion-item>
|
||||
</div>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
|
||||
|
||||
@@ -50,7 +50,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="!publicationList" class="post-item">
|
||||
<div *ngIf="!publicationList">
|
||||
<p>{{error}}</p>
|
||||
</div>
|
||||
<div hidden *ngIf="!publicationList" class="post-item">
|
||||
<div class="post-img">
|
||||
<img src="/assets/icon/icon-no-image.svg" alt="image">
|
||||
</div>
|
||||
|
||||
@@ -19,6 +19,8 @@ export class ViewPublicationsPage implements OnInit {
|
||||
publicationList: Publication[];
|
||||
item: PublicationFolder;
|
||||
|
||||
error: any;
|
||||
|
||||
@Input() folderId: string;
|
||||
@Output() addNewPublication = new EventEmitter<any>();
|
||||
@Output() openPublicationDetails= new EventEmitter<any>();
|
||||
@@ -95,6 +97,13 @@ export class ViewPublicationsPage implements OnInit {
|
||||
});
|
||||
console.log(this.publicationList);
|
||||
this.showLoader = false;
|
||||
},
|
||||
(error)=>{
|
||||
if(error.status == '404'){
|
||||
console.log('NOT FOUND');
|
||||
this.error = 'Sem publicações disponíveis!';
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user