mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
add publication
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<div class="content-container">
|
||||
|
||||
<div *ngIf="publicationType!='1'" class="ion-item-container">
|
||||
<ion-input [(ngModel)]="pubTitle" name="title" placeholder="Título" ></ion-input>
|
||||
<ion-input [(ngModel)]="pub.Title" name="title" placeholder="Título" ></ion-input>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
<div class="container-title py-10 hide-desktop">Fotografia Anexada</div>
|
||||
|
||||
<div class="picture d-flex pb-5 hide-desktop" *ngIf="publication.FileBase64.length > 10">
|
||||
<div class="picture d-flex pb-5 hide-desktop" *ngIf="publication.FileBase64">
|
||||
<div class="post-img">
|
||||
<img src="{{publication.FileBase64}}" alt="image" >
|
||||
</div>
|
||||
@@ -45,26 +45,26 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div *ngIf="capturedImage != ''" class="ion-item-container-no-border hide-desktop">
|
||||
<!-- <div *ngIf="capturedImage != ''" class="ion-item-container-no-border hide-desktop">
|
||||
<ion-label class="attached-title">Fotografia Anexada</ion-label>
|
||||
<ion-item lines="none">
|
||||
<ion-thumbnail slot="start">
|
||||
<ion-img [(ngModel)]="capturedImage" name="image" ngDefaultControl [src]="'data:image/png;base64,'+capturedImage"></ion-img>
|
||||
</ion-thumbnail>
|
||||
</ion-thumbnail> -->
|
||||
<!-- <ion-thumbnail *ngIf="!publication" slot="start">
|
||||
<ion-img [(ngModel)]="publication.imageUrl" [src]="guestPicture"></ion-img>
|
||||
</ion-thumbnail> -->
|
||||
<ion-label>
|
||||
<!-- <ion-label>
|
||||
<p>{{capturedImageTitle}}</p>
|
||||
<p hidden>size</p>
|
||||
</ion-label>
|
||||
<ion-icon (click)="clear()" name="close"></ion-icon>
|
||||
</ion-item>
|
||||
</ion-item> -->
|
||||
|
||||
<!-- <ion-thumbnail>
|
||||
<ion-img src="{{imgUrl}}"></ion-img>
|
||||
</ion-thumbnail> -->
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
|
||||
<div class="ion-item-container-no-border hide-desktop">
|
||||
<ion-label (click)="takePicture()">
|
||||
|
||||
@@ -24,8 +24,7 @@ import { LoadingService } from 'src/app/services/loading.service';
|
||||
})
|
||||
export class NewPublicationPage implements OnInit {
|
||||
showLoader: boolean;
|
||||
pub: Publication;
|
||||
pubTitle:string;
|
||||
pub: Publication = new Publication();
|
||||
image: Image = new Image();
|
||||
|
||||
publicationTitle:string;
|
||||
@@ -35,7 +34,8 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
|
||||
photo: SafeResourceUrl;
|
||||
publication: Publication;
|
||||
|
||||
publication: Publication = new Publication();
|
||||
|
||||
@Input() publicationType: string;
|
||||
@Input() folderId: string;
|
||||
@@ -56,16 +56,9 @@ export class NewPublicationPage implements OnInit {
|
||||
private camera: Camera,
|
||||
) {
|
||||
this.publicationTitle = 'Nova Publicação';
|
||||
this.pubTitle = 'new';
|
||||
this.pub = new Publication();
|
||||
this.pub.Title = 'title';
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.publication);
|
||||
console.log(this.folderId);
|
||||
console.log(this.publicationType);
|
||||
|
||||
this.setTitle();
|
||||
this.clear();
|
||||
this.takePicture();
|
||||
@@ -112,9 +105,7 @@ export class NewPublicationPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
save(){
|
||||
console.log(this.publicationType);
|
||||
|
||||
async save(){
|
||||
if(this.publicationType == '3'){
|
||||
|
||||
if(this.capturedImage != ''){
|
||||
@@ -148,7 +139,7 @@ save(){
|
||||
}
|
||||
console.log('Edit - keep image');
|
||||
console.log(this.publication);
|
||||
/* this.publications.UpdatePublication(this.publication.ProcessId, this.publication); */
|
||||
this.publications.UpdatePublication(this.publication.ProcessId, this.publication);
|
||||
this.goBack();
|
||||
}
|
||||
}
|
||||
@@ -158,19 +149,18 @@ save(){
|
||||
DateIndex: new Date(),
|
||||
DocumentId:null,
|
||||
ProcessId:this.folderId,
|
||||
Title: this.pubTitle,
|
||||
Title: this.pub.Title,
|
||||
Message: this.pub.Message,
|
||||
DatePublication: new Date(),
|
||||
OriginalFileName: this.capturedImageTitle,
|
||||
FileBase64: this.capturedImage,
|
||||
FileExtension: 'jpeg',
|
||||
}
|
||||
console.log(this.pubTitle);
|
||||
console.log(this.pub);
|
||||
|
||||
console.log(this.publication);
|
||||
//this.publications.CreatePublication(this.folderId, this.publication);
|
||||
this.publications.CreatePublication(this.folderId, this.publication);
|
||||
|
||||
//this.closeDesktopComponent.emit();
|
||||
this.closeDesktopComponent.emit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -330,7 +330,7 @@ border-top: 1px solid #d8d8d8;
|
||||
}
|
||||
.showAsideOptions{
|
||||
|
||||
@media only screen and (min-width: 801px) {
|
||||
@media only screen and (min-width: 800px) {
|
||||
.div-icon{
|
||||
display: none;
|
||||
}
|
||||
|
||||
+1
-1
@@ -65,7 +65,7 @@
|
||||
.flex-0{ flex: 0;}
|
||||
|
||||
|
||||
@media only screen and (min-width: 1024px) {
|
||||
@media only screen and (min-width: 800px) {
|
||||
// overflow
|
||||
.v-application-md .overflow-md-auto {overflow: auto !important;}
|
||||
.overflow-md-hidden {overflow: hidden !important;}
|
||||
|
||||
Reference in New Issue
Block a user