Add despachos-pr modal

This commit is contained in:
Peter Maquiran
2021-05-13 14:09:06 +01:00
parent 5e0c0173d6
commit a8e7b95a3f
4 changed files with 75 additions and 40 deletions
@@ -10,7 +10,7 @@ import { PedidosPage } from './pedidos/pedidos.page';
import { PendentesPage } from './pendentes/pendentes.page';
import { AuthService } from 'src/app/services/auth.service';
import { User } from 'src/app/models/user.model';
import { DespachosPrPage } from 'src/app/pages/gabinete-digital/despachos-pr/despachos-pr.page'
@Component({
selector: 'app-gabinete-digital',
templateUrl: './gabinete-digital.page.html',
@@ -285,10 +285,10 @@ export class GabineteDigitalPage implements OnInit {
}
}
openDespachosPrPage(segment:string){
openDespachosPrPage(segment:string) {
this.closeAllDesktopComponents();
if( window.innerWidth <= 1024){
this.openDespachoList();
this.openDespachoListPr();
}
else{
this.showDespachosPr = true;
@@ -372,6 +372,21 @@ export class GabineteDigitalPage implements OnInit {
console.log('show desktop modal')
}
async openDespachoListPr(){
this.closeAllDesktopComponent();
const modal = await this.modalController.create({
component: DespachosPrPage,
componentProps:{
profile: this.profile,
},
cssClass: 'modal modal-desktop',
});
await modal.present();
modal.onDidDismiss();
console.log('show desktop modal')
}
async openPedidoList(){
this.closeAllDesktopComponent();
const modal = await this.modalController.create({