mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
Bug on synch event edit and delete and added offline synch to event to aprove REver
This commit is contained in:
@@ -17,6 +17,7 @@ import { SqliteService } from '../../../../services/sqlite.service';
|
||||
import { BackgroundService } from '../../../../services/background.service';
|
||||
import { Platform } from '@ionic/angular';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
import { OfflineManagerService } from 'src/app/services/offline-manager.service';
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -62,6 +63,7 @@ export class ApproveEventPage implements OnInit {
|
||||
private platform: Platform,
|
||||
private backgroundservice: BackgroundService,
|
||||
public ThemeService: ThemeService,
|
||||
private offlineManager: OfflineManagerService
|
||||
) {
|
||||
this.activatedRoute.paramMap.subscribe(params => {
|
||||
// console.log(params["params"]);
|
||||
@@ -255,7 +257,11 @@ export class ApproveEventPage implements OnInit {
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
await this.processes.PostTaskAction(body).toPromise();
|
||||
await this.processes.PostTaskAction(body).toPromise()
|
||||
.catch(() => {
|
||||
console.log('Send event to approve for revition')
|
||||
this.offlineManager.storeRequestData('event-listRever', body);
|
||||
});
|
||||
this.toastService._successMessage('Pedido enviado');
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user