mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
1 line
6.8 KiB
JSON
1 line
6.8 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 { Injectable } from '@angular/core';\nimport { AlertController, AnimationController } from '@ionic/angular';\nimport { ChatSystemService } from './chat/chat-system.service';\nimport { ToastService } from './toast.service';\nlet AlertService = class AlertService {\n constructor(alertController, animationController, toastService, ChatSystemService) {\n this.alertController = alertController;\n this.animationController = animationController;\n this.toastService = toastService;\n this.ChatSystemService = ChatSystemService;\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 presentErrorMessage(message) {\n var _this2 = this;\n return _asyncToGenerator(function* () {\n const alert = yield _this2.alertController.create({\n cssClass: 'my-custom-class',\n header: 'Mensagem de erro',\n message: message\n });\n yield alert.present();\n setTimeout(() => {\n alert.dismiss();\n }, 2500);\n })();\n }\n confirmDeleteMessage(msgId, room) {\n var _this3 = this;\n return _asyncToGenerator(function* () {\n const alert = yield _this3.alertController.create({\n cssClass: 'my-custom-class',\n header: 'Apagar a mensagem?',\n buttons: [{\n text: 'Cancelar',\n role: 'cancel',\n cssClass: 'secondary',\n handler: () => {\n //\n }\n }, {\n text: 'Apagar',\n handler: () => {\n //const loader = this.toastService.loading();\n _this3.ChatSystemService.deleteMessage(msgId).then(() => {\n room.deleteMessage(msgId);\n }).catch(error => console.error(error));\n //this.ChatSystemService.subscribeToRoomUpdate(room._id, room);\n //loader.remove();\n }\n }]\n });\n\n yield alert.present();\n })();\n }\n};\nAlertService.ctorParameters = () => [{\n type: AlertController\n}, {\n type: AnimationController\n}, {\n type: ToastService\n}, {\n type: ChatSystemService\n}];\nAlertService = __decorate([Injectable({\n providedIn: 'root'\n})], AlertService);\nexport { AlertService };","map":{"version":3,"mappings":";;AAAA,SAASA,UAAU,QAAQ,eAAe;AAC1C,SAASC,eAAe,EAAEC,mBAAmB,QAAQ,gBAAgB;AACrE,SAASC,iBAAiB,QAAQ,4BAA4B;AAC9D,SAASC,YAAY,QAAQ,iBAAiB;AAKvC,IAAMC,YAAY,GAAlB,MAAMA,YAAY;EAEvBC,YACSC,eAAgC,EAC/BC,mBAAwC,EACxCC,YAA0B,EAC3BN,iBAAoC;IAHpC,oBAAe,GAAfI,eAAe;IACd,wBAAmB,GAAnBC,mBAAmB;IACnB,iBAAY,GAAZC,YAAY;IACb,sBAAiB,GAAjBN,iBAAiB;EACpB;EAEAO,YAAYA,CAACC,OAAc;IAAA;IAAA;MAC/B,MAAMC,KAAK,SAASC,KAAI,CAACN,eAAe,CAACO,MAAM,CAAC;QAC9CC,QAAQ,EAAE,iBAAiB;QAC3BC,MAAM,EAAE,qBAAqB;QAC7BL,OAAO,EAAEA,OAAO;QAChBM,OAAO,EAAE,CAAC,IAAI;OACf,CAAC;MAEF,MAAML,KAAK,CAACM,OAAO,EAAE;IAAC;EACxB;EAEMC,mBAAmBA,CAACR,OAAc;IAAA;IAAA;MACtC,MAAMC,KAAK,SAASQ,MAAI,CAACb,eAAe,CAACO,MAAM,CAAC;QAC9CC,QAAQ,EAAE,iBAAiB;QAC3BC,MAAM,EAAE,kBAAkB;QAC1BL,OAAO,EAAEA;OACV,CAAC;MAEF,MAAMC,KAAK,CAACM,OAAO,EAAE;MAErBG,UAAU,CAAC,MAAI;QACbT,KAAK,CAACU,OAAO,EAAE;MACjB,CAAC,EAAE,IAAI,CAAC;IAAC;EACX;EAEMC,oBAAoBA,CAACC,KAAS,EAAEC,IAAQ;IAAA;IAAA;MAE5C,MAAMb,KAAK,SAASc,MAAI,CAACnB,eAAe,CAACO,MAAM,CAAC;QAC9CC,QAAQ,EAA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