mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Merge branch 'feature/calendar' into developer
This commit is contained in:
@@ -53,7 +53,8 @@ export class NewPublicationPage implements OnInit {
|
||||
private publications: PublicationsService,
|
||||
private camera: Camera,
|
||||
) {
|
||||
|
||||
|
||||
alert('!!!!!')
|
||||
this.publicationType = this.navParams.get('publicationType');
|
||||
this.folderId = this.navParams.get('folderId');
|
||||
this.publicationTitle = 'Nova Publicação';
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
:host{
|
||||
background: #0782c9;
|
||||
}
|
||||
|
||||
ion-content{
|
||||
--background: transparent;
|
||||
transform: translate3d(0, 5px, 0);
|
||||
--border-radius: 30px;
|
||||
}
|
||||
ion-footer{
|
||||
background: #fff;
|
||||
}
|
||||
ion-toolbar{
|
||||
/* --background:#0782c9; */
|
||||
border-width: 0 !important;
|
||||
}
|
||||
.div-top-header{
|
||||
@@ -55,7 +51,6 @@
|
||||
border-top-right-radius: 25px;
|
||||
background: #ffffff;
|
||||
height: 100%;
|
||||
box-shadow: 0px 0px 18px rgba(0, 0, 0, 0.6);
|
||||
padding: 25px 0px 0 0px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,9 @@ import { PublicationsPageRoutingModule } from './publications-routing.module';
|
||||
import { PublicationsPage } from './publications.page';
|
||||
import { SharedModule } from 'src/app/shared/shared.module';
|
||||
import { ViewPublicationsPage } from 'src/app/shared/publication/view-publications/view-publications.page';
|
||||
import { NewPublicationPage } from 'src/app/shared/publication/new-publication/new-publication.page';
|
||||
import { PublicationDetailPage } from 'src/app/shared/publication/view-publications/publication-detail/publication-detail.page';
|
||||
import { NewActionPage } from 'src/app/shared/publication/new-action/new-action.page';
|
||||
|
||||
|
||||
@NgModule({
|
||||
@@ -21,7 +24,10 @@ import { ViewPublicationsPage } from 'src/app/shared/publication/view-publicatio
|
||||
],
|
||||
declarations: [
|
||||
PublicationsPage,
|
||||
ViewPublicationsPage
|
||||
ViewPublicationsPage,
|
||||
NewPublicationPage,
|
||||
PublicationDetailPage,
|
||||
NewActionPage
|
||||
]
|
||||
})
|
||||
export class PublicationsPageModule {}
|
||||
|
||||
@@ -44,10 +44,9 @@
|
||||
</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item"
|
||||
|
||||
*ngFor="let evento of publicationsEventFolderList"
|
||||
(click)="viewPublications(evento)">
|
||||
<div class="item width-100"
|
||||
*ngFor="let evento of publicationsEventFolderList"
|
||||
(click)="viewPublications(evento)">
|
||||
<div class="item-icon2">
|
||||
<ion-icon slot="end" src='assets/images/icons-nav-actions.svg'></ion-icon>
|
||||
</div>
|
||||
@@ -62,16 +61,50 @@
|
||||
</div>
|
||||
|
||||
<!-- Right -->
|
||||
<div class="d-none d-md-flex flex-grow-1 flex-column max-width-60">
|
||||
<!-- <app-view-publications></app-view-publications> -->
|
||||
<div class="d-none d-md-flex flex-grow-1 flex-column max-width-60"
|
||||
style="border-left: 1px solid #d8d8d8;">
|
||||
|
||||
<div class="width-100 height-100 d-flex align-center justify-center"
|
||||
*ngIf="(
|
||||
desktopComponent.showViewPublication == false &&
|
||||
desktopComponent.showAddNewPublication == false &&
|
||||
desktopComponent.showPublicationDetail == false &&
|
||||
desktopComponent.showAddActions == false
|
||||
)"><div>Nenhuma publicação delecionado</div></div>
|
||||
|
||||
<!-- View Publication -->
|
||||
<app-view-publications
|
||||
*ngIf="desktopComponent.showViewPublication"
|
||||
[folderId]="folderId"
|
||||
class="height-100 d-flex flex-column overflow-hidden"
|
||||
class="height-100 d-flex flex-column overflow-hidden flex-grow-1"
|
||||
(addNewPublication)="addNewPublication($event)"
|
||||
(openPublicationDetails)="openPublicationDetails($event)"
|
||||
>
|
||||
</app-view-publications>
|
||||
|
||||
<app-new-publication *ngIf="desktopComponent.showAddNewPublication"
|
||||
class="height-100 d-flex flex-column overflow-hidden background-white flex-grow-1"
|
||||
[folderId]="folderId"
|
||||
[publicationType]="publicationType"
|
||||
[publication]="publication"
|
||||
(closeDesktopComponent)="closeDesktopComponent($event)"
|
||||
>
|
||||
</app-new-publication>
|
||||
|
||||
<app-publication-detail-shared
|
||||
*ngIf="desktopComponent.showPublicationDetail"
|
||||
class="height-100 d-flex flex-column overflow-hidden background-white flex-grow-1"
|
||||
[publicationId]="publicationId"
|
||||
(addNewPublication)="addNewPublication($event)"
|
||||
(closeDesktopComponent)="closeDesktopComponent($event)"
|
||||
></app-publication-detail-shared>
|
||||
|
||||
<app-new-action
|
||||
*ngIf="desktopComponent.showAddActions"
|
||||
class="height-100 d-flex flex-column overflow-hidden background-white flex-grow-1"
|
||||
(closeDesktopComponent)="closeDesktopComponent($event)"
|
||||
></app-new-action>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -91,7 +91,6 @@ ion-toolbar{
|
||||
padding: 15px 20px 0 20px;
|
||||
}
|
||||
.item{
|
||||
width: 360px;
|
||||
padding: 0 0px 0 0px;
|
||||
overflow: auto;
|
||||
margin: 0px auto;
|
||||
|
||||
@@ -34,9 +34,18 @@ export class PublicationsPage implements OnInit {
|
||||
|
||||
desktopComponent: any = {
|
||||
showViewPublication: false,
|
||||
showAddNewPublication: false,
|
||||
showPublicationDetail: false,
|
||||
showAddActions: false
|
||||
}
|
||||
|
||||
folderId: string;
|
||||
// data set from child component
|
||||
publicationType: any;
|
||||
publicationId: string;
|
||||
|
||||
// from publication details
|
||||
publication: object;
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
@@ -96,18 +105,26 @@ export class PublicationsPage implements OnInit {
|
||||
}
|
||||
|
||||
async AddPublicationFolder(item:any) {
|
||||
const modal = await this.modalController.create({
|
||||
component: NewActionPage,
|
||||
componentProps:{
|
||||
item: item,
|
||||
},
|
||||
cssClass: 'new-action',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(()=>{
|
||||
this.doRefresh();
|
||||
});
|
||||
|
||||
this.closeDesktopComponent();
|
||||
if(window.innerHeight >= 1024){
|
||||
const modal = await this.modalController.create({
|
||||
component: NewActionPage,
|
||||
componentProps:{
|
||||
item: item,
|
||||
},
|
||||
cssClass: 'new-action',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then(()=>{
|
||||
this.doRefresh();
|
||||
});
|
||||
} else {
|
||||
this.desktopComponent.showAddActions = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
async viewPublications(folderId: string) {
|
||||
@@ -137,6 +154,7 @@ export class PublicationsPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
this.closeDesktopComponent();
|
||||
|
||||
// OpenModal
|
||||
if( window.innerWidth <= 1024){
|
||||
@@ -164,4 +182,35 @@ export class PublicationsPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
async addNewPublication({publicationType, folderId, publication}){
|
||||
|
||||
this.closeDesktopComponent();
|
||||
|
||||
// propr to add new publication
|
||||
this.publicationType = publicationType;
|
||||
this.folderId = folderId;
|
||||
this.publication = publication;
|
||||
|
||||
this.desktopComponent.showAddNewPublication = true;
|
||||
}
|
||||
|
||||
async openPublicationDetails(publicationId: string){
|
||||
|
||||
this.publicationId = publicationId;
|
||||
|
||||
this.closeDesktopComponent();
|
||||
this.desktopComponent.showPublicationDetail = true;
|
||||
|
||||
}
|
||||
|
||||
async closeDesktopComponent (xx?: any){
|
||||
|
||||
this.desktopComponent = {
|
||||
showViewPublication: false,
|
||||
showAddNewPublication: false,
|
||||
showPublicationDetail: false,
|
||||
showAddActions: false,
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user