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