mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
bugs before presantation
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
|
||||
<video *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'video'" width="70" height="70"
|
||||
controls="controls" preload="metadata" autoplay="autoplay" webkit-playsinline="webkit-playsinline">
|
||||
<source type="video/mp4" [src]="'data:video/mp4;base64,' + seleted.FileBase64">
|
||||
<source type="video/mp4" [src]="seleted.FileBase64">
|
||||
</video>
|
||||
|
||||
|
||||
|
||||
@@ -252,7 +252,7 @@ export class NewPublicationPage implements OnInit {
|
||||
.then(async (content) => {
|
||||
this.filecontent = true;
|
||||
let fileObject = {
|
||||
FileBase64: 'data:video/mp4;base64,'+content.data,
|
||||
FileBase64: 'data:video/mp4;base64,' + content.data,
|
||||
FileExtension: 'mp4',
|
||||
OriginalFileName: 'video'
|
||||
}
|
||||
|
||||
@@ -98,6 +98,7 @@ export class PublicationsPage implements OnInit {
|
||||
|
||||
this.hideRefreshButton();
|
||||
this.intent = window["sharedContent"]
|
||||
window["refreshPublication"] = this.refreshing
|
||||
|
||||
}
|
||||
|
||||
@@ -124,7 +125,7 @@ export class PublicationsPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
refreshing() {
|
||||
refreshing = () => {
|
||||
setTimeout(() => {
|
||||
this.getActions();
|
||||
}, 1500);
|
||||
@@ -300,6 +301,9 @@ export class PublicationsPage implements OnInit {
|
||||
const loader = this.toastService.loading();
|
||||
try {
|
||||
await this.publications.DeletePresidentialAction(id).toPromise();
|
||||
if(window["refreshPublication"]) {
|
||||
window["refreshPublication"]();
|
||||
}
|
||||
this.toastService._successMessage()
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
|
||||
@@ -270,6 +270,7 @@ export class ViewPublicationsPage implements OnInit {
|
||||
|
||||
if (!found) {
|
||||
this.publicationFolderService.publicationList[folderId].push(publicationDetails)
|
||||
this.publicationFolderService.revertPublicationOrder(folderId)
|
||||
} else {
|
||||
|
||||
|
||||
@@ -348,4 +349,25 @@ export class ViewPublicationsPage implements OnInit {
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
|
||||
getSortedPublications(): Publication[] {
|
||||
const unsortedPublications = this.publicationFolderService.publicationList[this.folderId];
|
||||
|
||||
if (unsortedPublications) {
|
||||
// Copiar a lista original para evitar alterações indesejadas
|
||||
const publicationsCopy = [...unsortedPublications];
|
||||
|
||||
// Ordenar as publicações pelo DatePublication
|
||||
publicationsCopy.sort((a, b) => {
|
||||
const dateA = new Date(a.DatePublication).getTime();
|
||||
const dateB = new Date(b.DatePublication).getTime();
|
||||
return dateA - dateB;
|
||||
});
|
||||
|
||||
return publicationsCopy;
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user