This commit is contained in:
tiago.kayaya
2021-04-08 09:14:28 +01:00
parent 8a4f296f96
commit a87fd0b6ed
9 changed files with 124 additions and 30 deletions
+68 -2
View File
@@ -6479,6 +6479,11 @@
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA=="
},
"deepmerge": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz",
"integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg=="
},
"default-gateway": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-4.2.0.tgz",
@@ -7019,8 +7024,7 @@
"entities": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz",
"integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==",
"dev": true
"integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A=="
},
"env-paths": {
"version": "2.2.0",
@@ -8248,6 +8252,11 @@
"minimalistic-assert": "^1.0.1"
}
},
"he": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw=="
},
"hex-color-regex": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/hex-color-regex/-/hex-color-regex-1.1.0.tgz",
@@ -8316,6 +8325,63 @@
"integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==",
"dev": true
},
"html-to-text": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/html-to-text/-/html-to-text-7.0.0.tgz",
"integrity": "sha512-UR/WMSHRN8m+L7qQUhbSoxylwBovNPS+xURn/pHeJvbnemhyMiuPYBTBGqB6s8ajAARN5jzKfF0d3CY86VANpA==",
"requires": {
"deepmerge": "^4.2.2",
"he": "^1.2.0",
"htmlparser2": "^6.0.0",
"minimist": "^1.2.5"
},
"dependencies": {
"dom-serializer": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.2.0.tgz",
"integrity": "sha512-n6kZFH/KlCrqs/1GHMOd5i2fd/beQHuehKdWvNNffbGHTr/almdhuVvTVFb3V7fglz+nC50fFusu3lY33h12pA==",
"requires": {
"domelementtype": "^2.0.1",
"domhandler": "^4.0.0",
"entities": "^2.0.0"
}
},
"domelementtype": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz",
"integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A=="
},
"domhandler": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.1.0.tgz",
"integrity": "sha512-/6/kmsGlMY4Tup/nGVutdrK9yQi4YjWVcVeoQmixpzjOUK1U7pQkvAPHBJeUxOgxF0J8f8lwCJSlCfD0V4CMGQ==",
"requires": {
"domelementtype": "^2.2.0"
}
},
"domutils": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/domutils/-/domutils-2.5.1.tgz",
"integrity": "sha512-hO1XwHMGAthA/1KL7c83oip/6UWo3FlUNIuWiWKltoiQ5oCOiqths8KknvY2jpOohUoUgnwa/+Rm7UpwpSbY/Q==",
"requires": {
"dom-serializer": "^1.0.1",
"domelementtype": "^2.2.0",
"domhandler": "^4.1.0"
}
},
"htmlparser2": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.0.1.tgz",
"integrity": "sha512-GDKPd+vk4jvSuvCbyuzx/unmXkk090Azec7LovXP8as1Hn8q9p3hbjmDGbUqqhknw0ajwit6LiiWqfiTUPMK7w==",
"requires": {
"domelementtype": "^2.0.1",
"domhandler": "^4.0.0",
"domutils": "^2.4.4",
"entities": "^2.0.0"
}
}
}
},
"htmlparser2": {
"version": "3.10.1",
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz",
+1
View File
@@ -50,6 +50,7 @@
"cordova-res": "^0.15.3",
"cordova-sqlite-storage": "^5.1.0",
"date-fns": "^2.17.0",
"html-to-text": "^7.0.0",
"ionic-selectable": "^4.7.1",
"ionic2-alpha-scroll": "^2.0.1",
"ionic2-calendar": "^0.6.6",
@@ -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">
+10 -2
View File
@@ -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!';
}
});
}