mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
merg
This commit is contained in:
@@ -58,7 +58,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div class="d-flex align-center">
|
<div class="d-flex align-center flex-column">
|
||||||
|
|
||||||
<ion-icon *ngIf="SessionStore.user.RoleDescription != 'Presidente da República' && SessionStore.user.RoleDescription != 'Ministro e Director do Gabinete do PR' && SessionStore.user.RoleDescription != 'Secretário Geral' " class="profile-pic"
|
<ion-icon *ngIf="SessionStore.user.RoleDescription != 'Presidente da República' && SessionStore.user.RoleDescription != 'Ministro e Director do Gabinete do PR' && SessionStore.user.RoleDescription != 'Secretário Geral' " class="profile-pic"
|
||||||
src="assets/images/theme/gov/icons-profile.svg"></ion-icon>
|
src="assets/images/theme/gov/icons-profile.svg"></ion-icon>
|
||||||
@@ -76,7 +76,11 @@
|
|||||||
src="assets/images/theme/gov/icons-profile.svg"></ion-icon>
|
src="assets/images/theme/gov/icons-profile.svg"></ion-icon>
|
||||||
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="profile-pic"
|
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="profile-pic"
|
||||||
src="assets/images/theme/{{ThemeService.currentTheme}}/icons-profile.svg"></ion-icon> -->
|
src="assets/images/theme/{{ThemeService.currentTheme}}/icons-profile.svg"></ion-icon> -->
|
||||||
|
<div style="background: black;width: 50px;height: 50px;position: relative;top: -33px;left: 38px;border-radius: 55px;overflow: hidden;border: 5px solid white;">
|
||||||
|
<img src="assets/images/camera.png">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="profile-info">
|
<div class="profile-info">
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -193,9 +193,9 @@
|
|||||||
<app-new-publication
|
<app-new-publication
|
||||||
*ngIf="desktopComponent.showAddNewPublication"
|
*ngIf="desktopComponent.showAddNewPublication"
|
||||||
class="height-100 d-flex flex-column overflow-hidden background-white flex-grow-1"
|
class="height-100 d-flex flex-column overflow-hidden background-white flex-grow-1"
|
||||||
[folderId]="folderId"
|
|
||||||
[publicationType]="publicationType"
|
[publicationType]="publicationType"
|
||||||
[publicationId]="publicationId"
|
[publication]="publication"
|
||||||
|
[folderId]="folderId"
|
||||||
|
|
||||||
(closeDesktopComponent)="closeDesktopComponent($event)"
|
(closeDesktopComponent)="closeDesktopComponent($event)"
|
||||||
(goBacktoPublicationDetails)="goBacktoPublicationDetails()"
|
(goBacktoPublicationDetails)="goBacktoPublicationDetails()"
|
||||||
|
|||||||
@@ -395,9 +395,9 @@ export class PublicationsPage implements OnInit {
|
|||||||
this.desktopComponent.showEditActions = true;
|
this.desktopComponent.showEditActions = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
async openPublicationDetails(publicationId: string) {
|
async openPublicationDetails({DocumentId, ProcessId}) {
|
||||||
|
|
||||||
this.publicationId = publicationId;
|
this.publicationId = DocumentId;
|
||||||
|
|
||||||
this.closeDesktopComponent();
|
this.closeDesktopComponent();
|
||||||
this.idSelected = this.folderId;
|
this.idSelected = this.folderId;
|
||||||
|
|||||||
+57
-70
@@ -21,7 +21,7 @@ import { PublicationFolderService } from 'src/app/store/publication-folder.servi
|
|||||||
})
|
})
|
||||||
export class PublicationDetailPage implements OnInit {
|
export class PublicationDetailPage implements OnInit {
|
||||||
showLoader: boolean;
|
showLoader: boolean;
|
||||||
publicationId: string;
|
DocumentId: string;
|
||||||
folderId: string;
|
folderId: string;
|
||||||
publication: Publication;
|
publication: Publication;
|
||||||
isModal = false
|
isModal = false
|
||||||
@@ -37,92 +37,79 @@ export class PublicationDetailPage implements OnInit {
|
|||||||
private httpErrorHandle: HttpErrorHandle,
|
private httpErrorHandle: HttpErrorHandle,
|
||||||
public publicationFolderService: PublicationFolderService
|
public publicationFolderService: PublicationFolderService
|
||||||
) {
|
) {
|
||||||
|
|
||||||
this.activatedRoute.paramMap.subscribe(params => {
|
|
||||||
// console.log(params["params"])
|
|
||||||
if(params["params"]) {
|
|
||||||
this.folderId = params["params"].folderId;
|
|
||||||
this.publicationId = params["params"].publicationId;
|
|
||||||
this.isModal = params["params"].isModal;
|
|
||||||
//
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.publication = {
|
|
||||||
DateIndex: null,
|
|
||||||
DocumentId: null,
|
|
||||||
ProcessId:'',
|
|
||||||
Title:'',
|
|
||||||
Message: '',
|
|
||||||
/* image: null, */
|
|
||||||
DatePublication: null,
|
|
||||||
FileBase64: '',
|
|
||||||
OriginalFileName: '',
|
|
||||||
FileExtension: '',
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.getPublicationDetail();
|
this.activatedRoute.paramMap.subscribe(params => {
|
||||||
|
// console.log(params["params"])
|
||||||
|
if(params["params"]) {
|
||||||
|
this.folderId = params["params"].folderId;
|
||||||
|
this.DocumentId = params["params"].publicationId;
|
||||||
|
this.isModal = params["params"].isModal;
|
||||||
|
//
|
||||||
|
|
||||||
|
console.log('params', params)
|
||||||
|
if(this.DocumentId) {
|
||||||
|
this.getPublicationDetail();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.publication = {
|
||||||
|
DateIndex: null,
|
||||||
|
DocumentId: null,
|
||||||
|
ProcessId:'',
|
||||||
|
Title:'',
|
||||||
|
Message: '',
|
||||||
|
/* image: null, */
|
||||||
|
DatePublication: null,
|
||||||
|
FileBase64: '',
|
||||||
|
OriginalFileName: '',
|
||||||
|
FileExtension: '',
|
||||||
|
};
|
||||||
}
|
}
|
||||||
doRefresh(event) {
|
doRefresh(event) {
|
||||||
this.getPublicationDetail();
|
this.getPublicationDetail();
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
try {
|
try {
|
||||||
event?.target?.complete();
|
event?.target?.complete();
|
||||||
} catch(error) {}
|
} catch(error) {}
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
getPublicationDetail() {
|
getPublicationDetail() {
|
||||||
const folderId = this.folderId
|
const folderId = this.folderId
|
||||||
const localPublication = this.publicationFolderService.getLocalPublication(folderId, this.publicationId);
|
|
||||||
|
|
||||||
if(localPublication?.DocumentId) {
|
this.showLoader = true;
|
||||||
|
|
||||||
|
this.publications.GetPublicationById(this.DocumentId).subscribe(res => {
|
||||||
|
|
||||||
|
/* this.publication = res; */
|
||||||
this.publication = {
|
this.publication = {
|
||||||
DateIndex: localPublication.DateIndex,
|
DateIndex: res.DateIndex,
|
||||||
DocumentId: localPublication.DocumentId,
|
DocumentId: res.DocumentId,
|
||||||
ProcessId:localPublication.ProcessId,
|
ProcessId:res.ProcessId,
|
||||||
Title:localPublication.Title,
|
Title:res.Title,
|
||||||
Message: localPublication.Message,
|
Message: res.Message,
|
||||||
DatePublication: localPublication.DatePublication,
|
DatePublication: res.DatePublication,
|
||||||
FileBase64: localPublication.FileBase64,
|
FileBase64: "data:image/jpeg;base64," + res.FileBase64,
|
||||||
OriginalFileName: localPublication.OriginalFileName,
|
OriginalFileName: res.OriginalFileName,
|
||||||
FileExtension: 'jpeg',
|
FileExtension: res.FileExtension,
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
|
|
||||||
this.showLoader = true;
|
console.log('this.publication', this.publication)
|
||||||
|
this.showLoader = false;
|
||||||
|
}, (error) => {
|
||||||
|
this.showLoader = false;
|
||||||
|
|
||||||
this.publications.GetPublicationById(this.publicationId).subscribe(res => {
|
if(error.status == 404) {
|
||||||
|
this.publicationFolderService.deletePost(this.publication.ProcessId, this.publication.DocumentId)
|
||||||
|
}
|
||||||
|
|
||||||
/* this.publication = res; */
|
this.goBack();
|
||||||
this.publication = {
|
this.httpErrorHandle.httpStatusHandle(error)
|
||||||
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: 'jpeg',
|
|
||||||
}
|
|
||||||
|
|
||||||
this.showLoader = false;
|
|
||||||
}, (error) => {
|
|
||||||
this.showLoader = false;
|
|
||||||
|
|
||||||
if(error.status == 404) {
|
|
||||||
this.publicationFolderService.deletePost(this.folderId, this.publicationId)
|
|
||||||
}
|
|
||||||
|
|
||||||
this.goBack();
|
|
||||||
this.httpErrorHandle.httpStatusHandle(error)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,18 +134,18 @@ export class PublicationDetailPage implements OnInit {
|
|||||||
const loader = this.toastService.loading()
|
const loader = this.toastService.loading()
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await this.publications.DeletePublication(this.folderId, this.publicationId).toPromise();
|
await this.publications.DeletePublication(this.folderId, this.DocumentId).toPromise();
|
||||||
this.httpErrorHandle.httpsSucessMessagge('Eliminar publicação')
|
this.httpErrorHandle.httpsSucessMessagge('Eliminar publicação')
|
||||||
|
|
||||||
if(window['app-view-publications-page-doRefresh']) {
|
if(window['app-view-publications-page-doRefresh']) {
|
||||||
window['app-view-publications-page-doRefresh']()
|
window['app-view-publications-page-doRefresh']()
|
||||||
}
|
}
|
||||||
|
|
||||||
this.publicationFolderService.deletePost(this.folderId, this.publicationId)
|
this.publicationFolderService.deletePost(this.folderId, this.DocumentId)
|
||||||
this.goBack();
|
this.goBack();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if(error.status == 404) {
|
if(error.status == 404) {
|
||||||
this.publicationFolderService.deletePost(this.folderId, this.publicationId)
|
this.publicationFolderService.deletePost(this.folderId, this.DocumentId)
|
||||||
this.goBack();
|
this.goBack();
|
||||||
}
|
}
|
||||||
this.httpErrorHandle.httpStatusHandle(error)
|
this.httpErrorHandle.httpStatusHandle(error)
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
<p class="px-20 item-content-detail font-14-em">{{publicationFolderService.FolderDetails[folderId].Detail}}</p>
|
<p class="px-20 item-content-detail font-14-em">{{publicationFolderService.FolderDetails[folderId].Detail}}</p>
|
||||||
|
|
||||||
<ion-card *ngFor="let publication of publicationFolderService.publicationList[folderId] let i = index"
|
<ion-card *ngFor="let publication of publicationFolderService.publicationList[folderId] let i = index"
|
||||||
(click)="goToPublicationDetail(publication.DocumentId)"
|
(click)="goToPublicationDetail(publication.DocumentId, publication.ProcessId)"
|
||||||
>
|
>
|
||||||
<ion-card-content>
|
<ion-card-content>
|
||||||
<div class="post-img">
|
<div class="post-img">
|
||||||
|
|||||||
@@ -229,15 +229,17 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
await modal.present();
|
await modal.present();
|
||||||
}
|
}
|
||||||
|
|
||||||
goToPublicationDetail(publicationId: string) {
|
goToPublicationDetail(DocumentId:string, ProcessId: string) {
|
||||||
this.router.navigate(['/home/publications/view-publications', this.folderId, publicationId]);
|
|
||||||
|
this.router.navigate(['/home/publications/view-publications', this.folderId, DocumentId]);
|
||||||
}
|
}
|
||||||
|
|
||||||
async viewPublicationDetail(publicationId: string) {
|
async viewPublicationDetail(DocumentId: string) {
|
||||||
|
alert('nice');
|
||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
component: PublicationDetailPage,
|
component: PublicationDetailPage,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
publicationId: publicationId,
|
DocumentId: DocumentId,
|
||||||
folderId: this.folderId,
|
folderId: this.folderId,
|
||||||
isModal: true
|
isModal: true
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export class PublicationPipe implements PipeTransform {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
itemList(element ): Publication {
|
itemList(element): Publication {
|
||||||
return {
|
return {
|
||||||
"DateIndex": element.DateIndex,
|
"DateIndex": element.DateIndex,
|
||||||
"DocumentId":element.DocumentId,
|
"DocumentId":element.DocumentId,
|
||||||
@@ -20,9 +20,9 @@ export class PublicationPipe implements PipeTransform {
|
|||||||
"DatePublication": element.DatePublication,
|
"DatePublication": element.DatePublication,
|
||||||
/* image:itemImage, */
|
/* image:itemImage, */
|
||||||
"FileBase64": "data:image/jpg;base64," + element.FileBase64,
|
"FileBase64": "data:image/jpg;base64," + element.FileBase64,
|
||||||
"OriginalFileName": element?.OriginalFileName,
|
"OriginalFileName": element.OriginalFileName,
|
||||||
"FileExtension": element?.FileExtension,
|
"FileExtension": element.FileExtension,
|
||||||
"OrganicEntityId": element.OrganicEntityId
|
"OrganicEntityId": element.OrganicEntityId,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,17 +47,17 @@
|
|||||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon font-45-em" src='assets/images/icons-profile.svg'></ion-icon>
|
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="icon font-45-em" src='assets/images/icons-profile.svg'></ion-icon>
|
||||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="icon font-45-em" src='assets/images/theme/gov/icons-profile.svg'></ion-icon> -->
|
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="icon font-45-em" src='assets/images/theme/gov/icons-profile.svg'></ion-icon> -->
|
||||||
|
|
||||||
<img *ngIf="loggeduser.RoleDescription == 'Presidente da República' " class="profile-image"
|
<img *ngIf="loggeduser.RoleDescription == 'Presidente da República' " class="icon font-45-em"
|
||||||
src='assets/images/presidente.png'>
|
src='assets/images/presidente.png'>
|
||||||
<img *ngIf="loggeduser.RoleDescription == 'Ministro e Director do Gabinete do PR' " class="profile-image"
|
<img *ngIf="loggeduser.RoleDescription == 'Ministro e Director do Gabinete do PR' " class="icon font-45-em"
|
||||||
src='assets/images/ministro.png'>
|
src='assets/images/ministro.png'>
|
||||||
<img *ngIf="loggeduser.RoleDescription == 'Secretário Geral' " class="profile-image"
|
<img *ngIf="loggeduser.RoleDescription == 'Secretário Geral' " class="icon font-45-em"
|
||||||
src='assets/images/secretaria_geral.png'>
|
src='assets/images/secretaria_geral.png'>
|
||||||
|
|
||||||
<ion-icon *ngIf="loggeduser.RoleDescription != 'Presidente da República'&& loggeduser.RoleDescription != 'Ministro e Director do Gabinete do PR' && loggeduser.RoleDescription != 'Secretário Geral' " class="icon font-45-em" src='assets/images/theme/gov/icons-profile.svg'></ion-icon>
|
<ion-icon *ngIf="loggeduser.RoleDescription != 'Presidente da República'&& loggeduser.RoleDescription != 'Ministro e Director do Gabinete do PR' && loggeduser.RoleDescription != 'Secretário Geral' " class="icon font-45-em" src='assets/images/theme/gov/icons-profile.svg'></ion-icon>
|
||||||
|
|
||||||
<div class="profile-text">
|
<div class="profile-text">
|
||||||
<div *ngIf="notificationLength > 0" class="icon-badge" style="right: -18px;top: -29px;">
|
<div *ngIf="notificationLength > 0" class="icon-badge" style="right: -6px;top: 38px;top: -6px;">
|
||||||
{{notificationLength}} </div>
|
{{notificationLength}} </div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -212,7 +212,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="profile-text">
|
<div class="profile-text">
|
||||||
<div *ngIf="notificationLength > 0" class="icon-badge" style="right: -18px;top: -29px;">
|
<div *ngIf="notificationLength > 0" class="icon-badge" style="right: -6px;top: 38px;top: -6px;">
|
||||||
{{notificationLength}} </div>
|
{{notificationLength}} </div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
.profile-image {
|
.profile-image {
|
||||||
border-radius: 80%; /* Tornar a imagem circular */
|
border-radius: 80%; /* Tornar a imagem circular */
|
||||||
width: 25.33%;
|
width: 100%;
|
||||||
height: 25.33%;
|
height: 25.33%;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
@@ -88,12 +88,12 @@
|
|||||||
|
|
||||||
.div-profile {
|
.div-profile {
|
||||||
height: fit-content;
|
height: fit-content;
|
||||||
justify-content: flex-end;
|
|
||||||
display: flex;
|
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
display: flex !important;
|
||||||
|
justify-content: end;
|
||||||
|
max-width: 45px;
|
||||||
|
border-radius: 50px;
|
||||||
|
|
||||||
.icon{
|
.icon{
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
+9
-23
@@ -9,6 +9,7 @@ import { ViewMediaPage } from 'src/app/modals/view-media/view-media.page';
|
|||||||
import { PermissionService } from 'src/app/services/permission.service';
|
import { PermissionService } from 'src/app/services/permission.service';
|
||||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||||
import { PublicationFolderService } from 'src/app/store/publication-folder.service';
|
import { PublicationFolderService } from 'src/app/store/publication-folder.service';
|
||||||
|
import { PublicationPipe } from 'src/app/pipes/publication.pipe';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-publication-detail-shared',
|
selector: 'app-publication-detail-shared',
|
||||||
templateUrl: './publication-detail.page.html',
|
templateUrl: './publication-detail.page.html',
|
||||||
@@ -23,6 +24,7 @@ export class PublicationDetailPage implements OnInit {
|
|||||||
@Output() addNewPublication = new EventEmitter<any>();
|
@Output() addNewPublication = new EventEmitter<any>();
|
||||||
@Output() closeDesktopComponent = new EventEmitter<any>();
|
@Output() closeDesktopComponent = new EventEmitter<any>();
|
||||||
@Output() goBackToViewPublications = new EventEmitter();
|
@Output() goBackToViewPublications = new EventEmitter();
|
||||||
|
publicationPipe = new PublicationPipe()
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
@@ -67,35 +69,18 @@ export class PublicationDetailPage implements OnInit {
|
|||||||
const folderId = this.folderId
|
const folderId = this.folderId
|
||||||
const localPublication = this.publicationFolderService.getLocalPublication(folderId, this.publicationId);
|
const localPublication = this.publicationFolderService.getLocalPublication(folderId, this.publicationId);
|
||||||
|
|
||||||
if(localPublication?.DocumentId) {
|
if(localPublication?.ProcessId) {
|
||||||
|
|
||||||
|
this.publication = localPublication
|
||||||
|
|
||||||
this.publication = {
|
|
||||||
DateIndex: localPublication.DateIndex,
|
|
||||||
DocumentId: localPublication.DocumentId,
|
|
||||||
ProcessId:localPublication.ProcessId,
|
|
||||||
Title:localPublication.Title,
|
|
||||||
Message: localPublication.Message,
|
|
||||||
DatePublication: localPublication.DatePublication,
|
|
||||||
FileBase64: localPublication.FileBase64,
|
|
||||||
OriginalFileName: localPublication.OriginalFileName,
|
|
||||||
FileExtension: 'jpeg',
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
this.showLoader = true;
|
this.showLoader = true;
|
||||||
this.publications.GetPublicationById(this.publicationId).subscribe(res => {
|
this.publications.GetPublicationById(this.publicationId).subscribe(res => {
|
||||||
|
|
||||||
this.publication = {
|
this.publication = this.publicationPipe.itemList(res)
|
||||||
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: 'jpeg',
|
|
||||||
}
|
|
||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
this.showLoader = false;
|
this.showLoader = false;
|
||||||
@@ -165,6 +150,7 @@ export class PublicationDetailPage implements OnInit {
|
|||||||
});
|
});
|
||||||
await modal.present();
|
await modal.present();
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
this.addNewPublication.emit({
|
this.addNewPublication.emit({
|
||||||
publicationType: publicationType,
|
publicationType: publicationType,
|
||||||
folderId: this.folderId,
|
folderId: this.folderId,
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
<p class="item-content-detail">{{publicationFolderService.FolderDetails[folderId].Detail}}</p>
|
<p class="item-content-detail">{{publicationFolderService.FolderDetails[folderId].Detail}}</p>
|
||||||
|
|
||||||
<ion-card *ngFor="let publication of publicationFolderService.publicationList[folderId] let i = index"
|
<ion-card *ngFor="let publication of publicationFolderService.publicationList[folderId] let i = index"
|
||||||
(click)="viewPublicationDetail(publication.DocumentId)">
|
(click)="viewPublicationDetail(publication.DocumentId, publication.ProcessId)">
|
||||||
<ion-card-content>
|
<ion-card-content>
|
||||||
<div class="post-img">
|
<div class="post-img">
|
||||||
<img [lazyLoad]="publication.FileBase64">
|
<img [lazyLoad]="publication.FileBase64">
|
||||||
|
|||||||
@@ -191,7 +191,6 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
const found = this.publicationIsPresent(publicationId, folderId)
|
const found = this.publicationIsPresent(publicationId, folderId)
|
||||||
if(!found) {
|
if(!found) {
|
||||||
this.publicationFolderService.publicationList[folderId].push(publicationDetails)
|
this.publicationFolderService.publicationList[folderId].push(publicationDetails)
|
||||||
// PublicationModel.create(publicationDetails)
|
|
||||||
} else {
|
} else {
|
||||||
this.publicationFolderService.publicationList[folderId][findIndex] = publicationDetails
|
this.publicationFolderService.publicationList[folderId][findIndex] = publicationDetails
|
||||||
}
|
}
|
||||||
@@ -287,9 +286,9 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async viewPublicationDetail(publicationId:string) {
|
async viewPublicationDetail(DocumentId:string, ProcessId: string) {
|
||||||
|
|
||||||
this.openPublicationDetails.emit(publicationId);
|
this.openPublicationDetails.emit({DocumentId, ProcessId});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,11 +84,11 @@ export class PublicationFolderService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
deletePost(folderId: any, publicationId: any) {
|
deletePost(folderId: any, DocumentId: any) {
|
||||||
|
|
||||||
if(this.publicationList[folderId]) {
|
if(this.publicationList[folderId]) {
|
||||||
|
|
||||||
this.publicationList[folderId] = this.publicationList[folderId].filter( e => e.DocumentId != publicationId)
|
this.publicationList[folderId] = this.publicationList[folderId].filter( e => e.DocumentId != DocumentId)
|
||||||
|
|
||||||
this.save(folderId)
|
this.save(folderId)
|
||||||
}
|
}
|
||||||
@@ -191,13 +191,10 @@ export class PublicationFolderService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
getLocalPublication (folderId, publicationId) {
|
getLocalPublication (folderId, DocumentId) {
|
||||||
|
|
||||||
if(this.publicationList[folderId]) {
|
if(this.publicationList[folderId]) {
|
||||||
|
return this.publicationList[folderId].find( e => e.DocumentId == DocumentId )
|
||||||
this.publicationList[folderId].filter( e=> e.ProcessId == publicationId || e.DocumentId == publicationId);
|
|
||||||
|
|
||||||
return this.publicationList[folderId].filter( e => e.ProcessId == publicationId || e.DocumentId == publicationId)?.[0]
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user