mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Fix go back
This commit is contained in:
@@ -7,6 +7,7 @@ import { EditEventToApproveComponent } from 'src/app/shared/gabinete-digital/edi
|
||||
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
|
||||
import { SuccessMessagePage } from 'src/app/shared/popover/success-message/success-message.page';
|
||||
import { EmendMessageModalPage } from '../emend-message-modal/emend-message-modal.page';
|
||||
import { Location } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'app-event-actions-popover',
|
||||
@@ -24,7 +25,8 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
private modalController: ModalController,
|
||||
private popoverController: PopoverController,
|
||||
private animationController: AnimationController,
|
||||
private toastService: ToastService,) {
|
||||
private toastService: ToastService,
|
||||
private location: Location) {
|
||||
this.serialNumber = this.navParams.get('serialNumber');
|
||||
this.instanceId = this.navParams.get('InstanceId');
|
||||
}
|
||||
@@ -37,22 +39,13 @@ export class EventActionsPopoverPage implements OnInit {
|
||||
};
|
||||
}
|
||||
|
||||
goBack(){
|
||||
goBack() {
|
||||
this.closePopover();
|
||||
|
||||
if (window.innerWidth <= 801) {
|
||||
this.router.navigate(['/home/gabinete-digital/event-list']);
|
||||
} else {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
'eventos': true
|
||||
}
|
||||
}
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
this.location.back()
|
||||
}
|
||||
|
||||
closePopover(){
|
||||
closePopover() {
|
||||
this.popoverController.dismiss();
|
||||
}
|
||||
|
||||
|
||||
@@ -104,13 +104,13 @@
|
||||
</ion-content>
|
||||
|
||||
<ion-footer class="display-none-true">
|
||||
<div class="buttons">
|
||||
<button class="btn-cancel" shape="round" (click)="emendTask(loadedEvent.serialNumber)">Rever</button>
|
||||
<ion-menu-button (click)="openMenu()" autoHide="false">
|
||||
<ion-icon name="ellipsis-vertical-outline"></ion-icon>
|
||||
</ion-menu-button>
|
||||
<button class="btn-ok" shape="round" (click)="approveTask(loadedEvent.serialNumber)">Aprovar</button>
|
||||
<button hidden class="btn-delete" shape="round" (click)="rejeitar(loadedEvent.serialNumber)">Rejeitar</button>
|
||||
<div class="buttons">
|
||||
<button class="btn-cancel" shape="round" (click)="emendTask(loadedEvent.serialNumber)">Rever</button>
|
||||
<ion-menu-button (click)="openMenu()" autoHide="false">
|
||||
<ion-icon name="ellipsis-vertical-outline"></ion-icon>
|
||||
</ion-menu-button>
|
||||
<button class="btn-ok" shape="round" (click)="approveTask(loadedEvent.serialNumber)">Aprovar</button>
|
||||
<button hidden class="btn-delete" shape="round" (click)="rejeitar(loadedEvent.serialNumber)">Rejeitar</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ion-footer>
|
||||
|
||||
@@ -8,7 +8,7 @@ import { SHA1 } from 'crypto-js'
|
||||
export class ChatUserService {
|
||||
|
||||
// main data
|
||||
private _userList = []
|
||||
private _userList = {}
|
||||
// local storage keyName
|
||||
private keyName: string;
|
||||
|
||||
@@ -17,8 +17,8 @@ export class ChatUserService {
|
||||
this.keyName = ('chat'+SHA1(this.constructor.name)).toString()
|
||||
|
||||
setTimeout(()=>{
|
||||
let restore = localstoreService.get(this.keyName, [])
|
||||
this._userList = restore.userList
|
||||
let restore = localstoreService.get(this.keyName, {})
|
||||
this._userList = restore.userList || {}
|
||||
}, 10)
|
||||
|
||||
}
|
||||
@@ -27,8 +27,9 @@ export class ChatUserService {
|
||||
return this._userList
|
||||
}
|
||||
|
||||
reset(userList: any[]) {
|
||||
this._userList = userList
|
||||
add(roomId:string, userList: any[] = []) {
|
||||
|
||||
this._userList[roomId] = userList
|
||||
|
||||
this.save()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user