mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
save
This commit is contained in:
@@ -85,6 +85,8 @@ export class PublicationDetailPage implements OnInit {
|
||||
}
|
||||
|
||||
async editPost(publicationType:any) {
|
||||
console.log('HERE');
|
||||
|
||||
console.log(this.publication);
|
||||
const modal = await this.modalController.create({
|
||||
component: NewPublicationPage,
|
||||
|
||||
@@ -10,6 +10,7 @@ import { ViewPublicationsPage } from './view-publications/view-publications.page
|
||||
import { Animation, AnimationController } from '@ionic/angular';
|
||||
import { LoadingController } from '@ionic/angular';
|
||||
import { LoadingService } from 'src/app/services/loading.service';
|
||||
import { Publication } from 'src/app/models/publication';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -20,6 +21,7 @@ import { LoadingService } from 'src/app/services/loading.service';
|
||||
export class PublicationsPage implements OnInit {
|
||||
showLoader: boolean;
|
||||
publicationFolder: PublicationFolder;
|
||||
publication: Publication;
|
||||
|
||||
publicationFolderList: PublicationFolder[];
|
||||
publicationsEventFolderList: PublicationFolder[];
|
||||
@@ -45,7 +47,7 @@ export class PublicationsPage implements OnInit {
|
||||
publicationId: string;
|
||||
|
||||
// from publication details
|
||||
publication: object;
|
||||
//publication: object;
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
|
||||
@@ -39,6 +39,7 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
@Input() publicationType: string;
|
||||
@Input() folderId: string;
|
||||
@Input() publicationId:string;
|
||||
@Output() closeDesktopComponent = new EventEmitter<any>();
|
||||
@Output() openPublicationDetails = new EventEmitter<any>();
|
||||
@Output() goBackToViewPublications = new EventEmitter<any>();
|
||||
@@ -59,10 +60,38 @@ export class NewPublicationPage implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
if(this.publicationType == '3'){
|
||||
this.getPublicationDetail();
|
||||
}
|
||||
this.setTitle();
|
||||
this.clear();
|
||||
this.takePicture();
|
||||
}
|
||||
|
||||
getPublicationDetail(){
|
||||
this.showLoader = true;
|
||||
console.log(this.publicationId);
|
||||
/* console.log(this.folderId); */
|
||||
this.publications.GetPublicationById(this.publicationId).subscribe(res=>{
|
||||
console.log(res);
|
||||
/* this.publication = res; */
|
||||
this.publication = {
|
||||
DateIndex: res.DateIndex,
|
||||
DocumentId: res.DocumentId,
|
||||
ProcessId:res.ProcessId,
|
||||
Title:res.Title,
|
||||
Message: res.Message,
|
||||
DatePublication: res.DatePublication,
|
||||
FileBase64: "data:image/jpg;base64," + res.FileBase64,
|
||||
OriginalFileName: res.OriginalFileName,
|
||||
FileExtension: 'jpeg',
|
||||
}
|
||||
this.pub = this.publication;
|
||||
this.showLoader = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
takePicture(){
|
||||
const options: CameraOptions = {
|
||||
quality: 90,
|
||||
@@ -189,7 +218,8 @@ export class NewPublicationPage implements OnInit {
|
||||
if(this.publicationType == '2'){
|
||||
this.goBackToViewPublications.emit();
|
||||
} else {
|
||||
this.goBacktoPublicationDetails.emit();
|
||||
this.goBackToViewPublications.emit();
|
||||
//this.goBacktoPublicationDetails.emit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -571,6 +571,6 @@ border-top: 1px solid #d8d8d8;
|
||||
}
|
||||
.title-icon{
|
||||
font-size: 40px !important;
|
||||
color: #0782c9;
|
||||
color: #42b9fe;
|
||||
overflow: auto;
|
||||
}
|
||||
Reference in New Issue
Block a user