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