Files
doneit-web/.angular/cache/14.2.12/babel-webpack/9159fd3258f7bb042f085bbd05ac3a98.json
T

1 line
18 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 } from '@angular/core';\nimport { ModalController, NavParams, PickerController } from '@ionic/angular';\nimport { ChatService } from 'src/app/services/chat.service';\nimport { ThemeService } from 'src/app/services/theme.service';\nlet EditGroupPage = class EditGroupPage {\n constructor(modalController, pickerController, chatService, navParams, ThemeService) {\n this.modalController = modalController;\n this.pickerController = pickerController;\n this.chatService = chatService;\n this.navParams = navParams;\n this.ThemeService = ThemeService;\n this.selectedDuration = ['', '', ''];\n this.roomId = this.navParams.get('roomId');\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 }\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 }\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.value + \" hora \" + value.minutes.value + \" minutos\";\n } else {\n _this.displayDuration = value.hours.value + \" horas \" + value.minutes.value + \" minutos\";\n }\n }\n }\n }\n }],\n columns: [{\n name: 'days',\n prefix: 'Dias',\n options: [{\n text: '0',\n value: 0\n }, {\n text: '1',\n value: 1\n }, {\n text: '2',\n value: 2\n }, {\n t