mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -209,6 +209,7 @@ export class EditEventPage implements OnInit {
|
||||
this.toastService.successMessage();
|
||||
|
||||
}, error => {
|
||||
if(error.status != 0)
|
||||
this.toastService.badRequest()
|
||||
});
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ import { DocumentSetUpMeetingPage } from 'src/app/modals/document-set-up-meeting
|
||||
import { ExpedientTaskModalPage } from '../../gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page';
|
||||
import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.page';
|
||||
import { BackgroundService } from 'src/app/services/background.service';
|
||||
import { StorageService } from 'src/app/services/storage.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-view-event',
|
||||
@@ -66,7 +67,8 @@ export class ViewEventPage implements OnInit {
|
||||
private location: Location,
|
||||
public platform: Platform,
|
||||
private sqliteservice: SqliteService,
|
||||
private backgroundservice: BackgroundService
|
||||
private backgroundservice: BackgroundService,
|
||||
private storage: StorageService
|
||||
) {
|
||||
this.isEventEdited = false;
|
||||
this.loadedEvent = new Event();
|
||||
@@ -100,6 +102,22 @@ export class ViewEventPage implements OnInit {
|
||||
this.loadEvent();
|
||||
|
||||
this.backgroundservice.registerBackService('Online', () => {
|
||||
this.storage.get('eventEdit').then((req) => {
|
||||
JSON.parse(req).forEach(element => {
|
||||
this.eventsService.editEvent(element, 2, 3).subscribe((res) => {
|
||||
this.storage.remove('eventEdit')
|
||||
console.log('eventEdit synchnize', res)
|
||||
})
|
||||
});
|
||||
})
|
||||
this.storage.get('eventDelete').then((req) => {
|
||||
JSON.parse(req).forEach(element => {
|
||||
this.eventsService.editEvent(element, 2, 3).subscribe((res) => {
|
||||
this.storage.remove('eventDelete')
|
||||
console.log('eventEdit synchnize', res)
|
||||
})
|
||||
});
|
||||
})
|
||||
this.loadEvent();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user