2020-12-01 14:03:15 +01:00
|
|
|
import { Component, OnInit } from '@angular/core';
|
2020-12-01 17:22:45 +01:00
|
|
|
import { ModalController, NavParams } from '@ionic/angular';
|
2020-12-01 14:03:15 +01:00
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
selector: 'app-new-publication',
|
|
|
|
|
templateUrl: './new-publication.page.html',
|
|
|
|
|
styleUrls: ['./new-publication.page.scss'],
|
|
|
|
|
})
|
|
|
|
|
export class NewPublicationPage implements OnInit {
|
2020-12-01 17:22:45 +01:00
|
|
|
publicationType:string;
|
|
|
|
|
publicationTitle:string;
|
|
|
|
|
constructor(
|
|
|
|
|
private modalController: ModalController,
|
|
|
|
|
private navParams: NavParams,
|
|
|
|
|
) {
|
|
|
|
|
this.publicationType = this.navParams.get('publicationType');
|
|
|
|
|
this.publicationTitle = 'Nova Publicação';
|
|
|
|
|
}
|
2020-12-01 14:03:15 +01:00
|
|
|
|
|
|
|
|
ngOnInit() {
|
2020-12-01 17:22:45 +01:00
|
|
|
this.setTitle();
|
|
|
|
|
}
|
|
|
|
|
save(){
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
close(){
|
|
|
|
|
this.modalController.dismiss();
|
|
|
|
|
}
|
|
|
|
|
setTitle(){
|
|
|
|
|
if(this.publicationType == '1'){
|
|
|
|
|
this.publicationTitle = 'Nova Publicação Rápida'
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
this.publicationTitle = 'Nova Publicação'
|
|
|
|
|
}
|
2020-12-01 14:03:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|