mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 05:45:50 +00:00
All changes i made
This commit is contained in:
@@ -18,6 +18,7 @@ import { NgxMatDateFormats } from '@angular-material-components/datetime-picker'
|
||||
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { ChatMethodsService } from 'src/app/services/chat/chat-methods.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
parse: {
|
||||
@@ -97,6 +98,7 @@ export class NewEventPage implements OnInit {
|
||||
public ThemeService: ThemeService,
|
||||
private platform: Platform,
|
||||
private chatMethodService: ChatMethodsService,
|
||||
private hhtpErrorHandle: HttpErrorHandle
|
||||
) {
|
||||
this.loggeduser = SessionStore.user;
|
||||
this.postEvent = new Event();
|
||||
@@ -440,17 +442,12 @@ export class NewEventPage implements OnInit {
|
||||
this.chatMethodService.sendMessage(this.roomId, data1);
|
||||
}
|
||||
|
||||
this.toastService._successMessage()
|
||||
this.hhtpErrorHandle.httpsSucessMessagge('new event');
|
||||
let data = Object.assign(this.postEvent,{id:eventId})
|
||||
this.modalController.dismiss(data);
|
||||
|
||||
} catch (error) {
|
||||
if(error.status == 0) {
|
||||
this.toastService._badRequest('Sem acesso à internet. Por favor verifique sua conexão')
|
||||
} else {
|
||||
|
||||
this.toastService._badRequest()
|
||||
}
|
||||
this.hhtpErrorHandle.httpStatusHandle(error)
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user