Files
doneit-web/.angular/cache/14.2.12/babel-webpack/6b4902f30f1b5334b591a42b13e44ecd.json
T

1 line
20 KiB
JSON
Raw Normal View History

2023-06-30 09:54:21 +01:00
{"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 \"./edit-group.page.html?ngResource\";\nimport __NG_CLI_RESOURCE__1 from \"./edit-group.page.scss?ngResource\";\nimport { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { ModalController, PickerController } from '@ionic/angular';\nimport { ChatService } from 'src/app/services/chat.service';\nimport { ThemeService } from 'src/app/services/theme.service';\nimport { SessionStore } from 'src/app/store/session.service';\nlet EditGroupPage = class EditGroupPage {\n constructor(modalController, pickerController, chatService, ThemeService) {\n this.modalController = modalController;\n this.pickerController = pickerController;\n this.chatService = chatService;\n this.ThemeService = ThemeService;\n this.selectedDuration = ['', '', ''];\n this.openGroupContacts = new EventEmitter();\n this.openGroupMessage = new EventEmitter();\n this.closeAllDesktopComponents = new EventEmitter();\n this.loggedUser = SessionStore.user.ChatData['data'];\n }\n ngOnInit() {\n // this.chatService.refreshtoken();\n this.getRoomInfo();\n }\n getRoomInfo() {\n this.chatService.getRoomInfo(this.roomId).subscribe(room => {\n this.room = room['room'];\n try {\n this.groupName = this.room.name.split('-').join(' ');\n } catch (error) {\n this.groupName = this.room.name;\n }\n });\n }\n close() {\n //this.modalController.dismiss();\n this.closeAllDesktopComponents.emit();\n this.openGroupMessage.emit(this.roomId);\n }\n changeGroupName() {\n if (this.groupName.trim().length > 1) {\n let name = this.groupName.split(' ').join('-');\n let body = {\n \"roomId\": this.room._id,\n \"name\": name\n };\n this.chatService.renameGroup(body).subscribe(res => {\n this.modalController.dismiss(res['group']);\n });\n } else {}\n this.updateGroup();\n }\n updateGroup() {\n this.showLoader = true;\n this.chatService.getRoomInfo(this.roomId).subscribe(room => {\n this.room = room['room'];\n this.showLoader = false;\n this.openGroupMessage.emit(this.room._id);\n });\n }\n _ionChange(event) {\n this.showDuration = event.detail.checked;\n }\n showPicker() {\n var _this = this;\n return _asyncToGenerator(function* () {\n const picker = yield _this.pickerController.create({\n cssClass: '',\n buttons: [{\n text: 'Cancelar',\n role: 'cancel',\n cssClass: 'btn-cancel'\n }, {\n text: 'Ok',\n cssClass: 'btn-cancel',\n handler: value => {\n _this.selectedDuration = [value.days.value, value.hours.value, value.minutes.value];\n if (value.days.value != null && value.hours.value != null && value.minutes.value != null) {\n if (value.days.value > 0) {\n if (value.days.value == 1) {\n if (value.hours.value == 1) {\n _this.displayDuration = value.days.value + \" day \" + value.hours.value + \" hora \" + value.minutes.value + \" minutos\";\n } else {\n _this.displayDuration = value.days.value + \" days \" + value.hours.value + \" horas \" + value.minutes.value + \" minutos\";\n }\n } else {\n if (value.hours.value == 1) {\n _this.displayDuration = value.days.value + \" days \" + value.hours.value + \" hora \" + value.minutes.value + \" minutos\";\n } else {\n _this.displayDuration = value.days.value + \" days \" + value.hours.value + \" horas \" + value.minutes.value + \" minutos\";\n }\n }\n } else {\n if (value.hours.value == 1) {\n _this.displayDuration = value.hours.valu