mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
profile picture done
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
|
||||
<ion-content>
|
||||
<div class="content-container">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||
|
||||
<div *ngIf="publicationType!='1'" class="ion-item-container" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" [(ngModel)]="pub.Title" name="title" placeholder="Título*" ></ion-input>
|
||||
@@ -29,6 +30,11 @@
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div *ngIf="publication">
|
||||
OriginalFileName: {{ publication.OriginalFileName }}
|
||||
</div> -->
|
||||
|
||||
|
||||
<!-- Captured -->
|
||||
<div class="ion-item-container-no-border" *ngIf="capturedImage">
|
||||
<ion-label class="attached-title pb-10">Fotografia Anexada</ion-label>
|
||||
|
||||
@@ -32,6 +32,7 @@ export class NewPublicationPage implements OnInit {
|
||||
@Input() publication!: Publication;
|
||||
@Input() publicationType: string;
|
||||
@Input() folderId:string;
|
||||
@Input() documentId:string;
|
||||
|
||||
@Output() closeDesktopComponent = new EventEmitter<any>();
|
||||
@Output() openPublicationDetails = new EventEmitter<any>();
|
||||
@@ -64,16 +65,45 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
|
||||
setData() {
|
||||
if(!this.publication) {
|
||||
if(!this.publicationType) {
|
||||
setTimeout(() => {
|
||||
this.setData()
|
||||
}, 500)
|
||||
} else {
|
||||
this.pub = this.publication
|
||||
// this.pub = this.publication
|
||||
// this.publication = null
|
||||
this.getPublicationDetail()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
getPublicationDetail() {
|
||||
|
||||
if(this.publicationType != '2') {
|
||||
this.showLoader = true;
|
||||
this.publications.GetPublicationById(this.documentId).subscribe( 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: res.FileExtension,
|
||||
}
|
||||
this.pub = this.publication;
|
||||
this.showLoader = false;
|
||||
}, () => {
|
||||
this.showLoader = false;
|
||||
this.goBack()
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
async takePicture() {
|
||||
const capturedImage = await Camera.getPhoto({
|
||||
quality: 50,
|
||||
@@ -150,6 +180,16 @@ export class NewPublicationPage implements OnInit {
|
||||
}
|
||||
|
||||
if(this.publicationType == '3') {
|
||||
|
||||
if(!this.publication?.OriginalFileName || !this.pub.OriginalFileName) {
|
||||
|
||||
if(this.pub?.OriginalFileName) {
|
||||
console.log('this.pub',this.pub)
|
||||
}
|
||||
throw('no this.publication.OriginalFileName')
|
||||
|
||||
}
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
if(this.capturedImage != '') {
|
||||
|
||||
+1
@@ -10,6 +10,7 @@
|
||||
<p class="post-data">{{publication.DatePublication | date: 'dd-MM-yyyy | h:mm'}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- OriginalFileName: {{ publication.OriginalFileName }} -->
|
||||
<div *ngIf="publication.Title == ''" class="title-contentd-flex pl-20 pt-25">
|
||||
<div class="back-icon cursor-pointer">
|
||||
<ion-icon (click)="goBack()" slot="end" src='assets/images/assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
|
||||
|
||||
+3
@@ -70,10 +70,13 @@ export class PublicationDetailPage implements OnInit {
|
||||
const localPublication = this.publicationFolderService.getLocalPublication(folderId, this.publicationId);
|
||||
|
||||
if(localPublication?.ProcessId) {
|
||||
console.log('console.log local storage')
|
||||
|
||||
this.publication = localPublication
|
||||
|
||||
} else {
|
||||
|
||||
console.log('API res')
|
||||
|
||||
this.showLoader = true;
|
||||
this.publications.GetPublicationById(this.publicationId).subscribe(res => {
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<div class="post-img">
|
||||
<img [lazyLoad]="publication.FileBase64">
|
||||
</div>
|
||||
<div class="post-content px-20">
|
||||
<div class="post-content">
|
||||
<div class="post-title-time">
|
||||
<div class="post-title">
|
||||
<ion-label>{{publication.Title}}</ion-label>
|
||||
|
||||
Reference in New Issue
Block a user