mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
add remove file on click while criaten oublication
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="d-flex">
|
||||
<ion-thumbnail *ngFor="let seleted of seletedContent.slice(0, displayLimit), let i = index" lot="start">
|
||||
<ion-thumbnail *ngFor="let seleted of seletedContent.slice(0, displayLimit), let i = index" (click)="deleteFromSeletedContent(i)" lot="start">
|
||||
|
||||
<ion-img *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'image'" [(ngModel)]="capturedImage"
|
||||
name="image" ngDefaultControl [src]="'data:image/jpg;base64,' + seleted.FileBase64"
|
||||
|
||||
@@ -233,7 +233,7 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
async startVideoRecording() {
|
||||
try {
|
||||
let options: CaptureImageOptions = { limit: 5 }
|
||||
let options: CaptureImageOptions = { limit: 1 }
|
||||
const data: any = await this.mediaCapture.captureVideo(options)
|
||||
this.video = data[0];
|
||||
console.log(data)
|
||||
@@ -727,6 +727,9 @@ export class NewPublicationPage implements OnInit {
|
||||
return parseInt(sizeInMB)
|
||||
}
|
||||
|
||||
deleteFromSeletedContent(index){
|
||||
this.seletedContent.splice(index,1)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class="main-content">
|
||||
<div class="ion-item-container" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
|
||||
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Assunto*"
|
||||
[(ngModel)]="_postEvent.Subject"></ion-input>
|
||||
[innerHTML]="_postEvent.Subject"></ion-input>
|
||||
</div>
|
||||
<div *ngIf="Form && validateFrom">
|
||||
<div *ngIf="Form.get('Subject').invalid " class="input-errror-message">
|
||||
|
||||
@@ -50,7 +50,7 @@ export class EditActionPage implements OnInit {
|
||||
public dateControlEnd = new FormControl(moment("DD MM YYYY hh"));
|
||||
public currentDate = new Date();
|
||||
|
||||
folder: PublicationFolder;
|
||||
folder: PublicationFolder = new PublicationFolder();;
|
||||
@Input() folderId: string;
|
||||
@Output() closeDesktopComponent= new EventEmitter<any>();
|
||||
@Output() updateDesktopComponent= new EventEmitter<any>();
|
||||
@@ -61,7 +61,7 @@ export class EditActionPage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
private httpErrorHandle: HttpErrorHandle,
|
||||
) {
|
||||
this.folder = new PublicationFolder();
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -73,12 +73,17 @@ export class EditActionPage implements OnInit {
|
||||
}
|
||||
|
||||
getPublicationDetail() {
|
||||
|
||||
this.publicationsService.GetPresidentialAction(this.folderId).subscribe( res => {
|
||||
this.folder = res;
|
||||
console.log('FOLDER',this.folder)
|
||||
|
||||
|
||||
this.dateControlStart = new FormControl(moment(new Date(this.folder.DateBegin)));
|
||||
this.dateControlEnd = new FormControl(moment(new Date(this.folder.DateEnd)));
|
||||
|
||||
},error => {
|
||||
console.log(error)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="d-flex">
|
||||
|
||||
<ion-thumbnail *ngFor="let seleted of seletedContent.slice(0, displayLimit), let i = index" lot="start">
|
||||
<ion-thumbnail *ngFor="let seleted of seletedContent.slice(0, displayLimit), let i = index" (click)="deleteFromSeletedContent(i)" lot="start">
|
||||
|
||||
<ion-img *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'image'"
|
||||
name="image" ngDefaultControl [src]="seleted.FileBase64"></ion-img>
|
||||
|
||||
@@ -808,4 +808,8 @@ export class NewPublicationPage implements OnInit {
|
||||
return parseInt(sizeInMB)
|
||||
}
|
||||
|
||||
deleteFromSeletedContent(index){
|
||||
this.seletedContent.splice(index,1)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user