mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
1 line
23 KiB
JSON
1 line
23 KiB
JSON
|
|
{"ast":null,"code":"import _asyncToGenerator from \"C:/Users/eudes.inacio/GabineteDigital/gabinete-digital-fo/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport { __decorate } from \"tslib\";\nimport __NG_CLI_RESOURCE__0 from \"./login.page.html?ngResource\";\nimport __NG_CLI_RESOURCE__1 from \"./login.page.scss?ngResource\";\nimport { Component } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { AuthService } from 'src/app/services/auth.service';\nimport { ToastService } from 'src/app/services/toast.service';\nimport { environment } from 'src/environments/environment';\nimport { AlertController } from '@ionic/angular';\nimport { NotificationsService } from 'src/app/services/notifications.service';\nimport { SessionStore } from 'src/app/store/session.service';\nimport { ClearStoreService } from 'src/app/services/clear-store.service';\nimport { ChangeProfileService } from 'src/app/services/change-profile.service';\nimport { ThemeService } from 'src/app/services/theme.service';\nimport { PermissionService } from 'src/app/services/permission.service';\nimport { MessageModel, DeleteMessageModel } from '../../models/beast-orm';\nimport { RochetChatConnectorService } from 'src/app/services/chat/rochet-chat-connector.service';\nimport { ChatSystemService } from 'src/app/services/chat/chat-system.service';\nimport { ChatService } from 'src/app/services/chat.service';\nimport { Platform } from '@ionic/angular';\nimport { FirstEnterService } from '../../services/first-enter.service';\nimport { Storage } from '@ionic/storage';\nimport { HttpErrorHandle } from 'src/app/services/http-error-handle.service';\nlet LoginPage = class LoginPage {\n constructor(notificatinsservice, router, authService, toastService, alertController, clearStoreService, changeProfileService, ThemeService, p, RochetChatConnectorService, ChatSystemService, ChatService, platform, FirstEnterService, storage, httpErrorHandle) {\n this.notificatinsservice = notificatinsservice;\n this.router = router;\n this.authService = authService;\n this.toastService = toastService;\n this.alertController = alertController;\n this.clearStoreService = clearStoreService;\n this.changeProfileService = changeProfileService;\n this.ThemeService = ThemeService;\n this.p = p;\n this.RochetChatConnectorService = RochetChatConnectorService;\n this.ChatSystemService = ChatSystemService;\n this.ChatService = ChatService;\n this.platform = platform;\n this.FirstEnterService = FirstEnterService;\n this.storage = storage;\n this.httpErrorHandle = httpErrorHandle;\n this.username = SessionStore.user.Email || environment.defaultuser;\n this.password = environment.defaultuserpwd;\n this.code = [];\n this.sessionStore = SessionStore;\n this.showPassword = false;\n this.passwordIcon = \"eye\";\n }\n ngOnInit() {}\n togglePassword() {\n this.showPassword = !this.showPassword;\n if (this.passwordIcon == \"eye\") {\n this.passwordIcon = \"eye-off\";\n } else {\n this.passwordIcon = \"eye\";\n }\n }\n //Function to validade the login inputs\n validateUsername() {\n return this.username.trim().length > 0;\n }\n validatePassword() {\n return this.password.trim().length > 0;\n }\n presentAlert(message) {\n var _this = this;\n return _asyncToGenerator(function* () {\n const alert = yield _this.alertController.create({\n cssClass: 'my-custom-class',\n header: 'Mensagem do sistema',\n message: message,\n buttons: ['OK']\n });\n yield alert.present();\n })();\n }\n getToken() {\n this.notificatinsservice.requestPermissions();\n this.notificatinsservice.registrationError();\n this.notificatinsservice.getAndpostToken(this.username);\n }\n Login() {\n var _this2 = this;\n return _asyncToGenerator(function* () {\n if (_this2.validateUsername()) {\n if (_this2.validatePassword()) {\n _this2.userattempt = {\n username: _this2.username.trim(),\n password
|