mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
remove un used import
This commit is contained in:
@@ -85,10 +85,8 @@ cypress/videos
|
||||
*.rar
|
||||
|
||||
src/app/domain
|
||||
src/app/controller
|
||||
src/app/models/beast-orm-pro.ts
|
||||
|
||||
|
||||
src/app/pipes/process.service.spec.ts
|
||||
src/app/pipes/process.service.ts
|
||||
src/app/controller/process/dispatch-controller
|
||||
@@ -4,11 +4,12 @@ import { Platform } from '@ionic/angular';
|
||||
import { StatusBar } from '@ionic-native/status-bar/ngx';
|
||||
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
||||
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
|
||||
import { SqliteService } from 'src/app/services/sqlite.service';
|
||||
import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
|
||||
import { InativityService } from "src/app/services/inativity.service";
|
||||
import { ThemeService } from 'src/app/services/theme.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { Storage } from '@ionic/storage';
|
||||
import { ChatController } from './controller/chat';
|
||||
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
parse: {
|
||||
@@ -35,13 +36,14 @@ export class AppComponent {
|
||||
constructor(
|
||||
private platform: Platform,
|
||||
private statusBar: StatusBar,
|
||||
private sqliteservice: SqliteService,
|
||||
private InativityService: InativityService,
|
||||
public ThemeService: ThemeService,
|
||||
private storage: Storage
|
||||
private storage: Storage,
|
||||
private ChatSystemService: ChatSystemService
|
||||
) {
|
||||
this.initializeApp();
|
||||
this.storage.set('version', environment.version).then(() => {})
|
||||
|
||||
ChatController.ChatSystemService = this.ChatSystemService
|
||||
}
|
||||
|
||||
initializeApp() {
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
import { ChatSystemService } from "../services/chat/chat-system.service";
|
||||
|
||||
export class ChatController {
|
||||
|
||||
static ChatSystemService: ChatSystemService
|
||||
|
||||
static async createGroup(name) {
|
||||
let data: any = await this.ChatSystemService.createGroup(name)
|
||||
|
||||
if(data?.error?.error == 'error-invalid-room-name') {
|
||||
name = name.slice(0, 12)
|
||||
data = await this.ChatSystemService.createGroup(name)
|
||||
return {
|
||||
data,
|
||||
roomName: name
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
data,
|
||||
roomName: name
|
||||
}
|
||||
}
|
||||
|
||||
static async createOrFindGroup(name) {
|
||||
let data: any = await this.createGroup(name)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
import { chatUser } from '../models/chatMethod'
|
||||
import { ChatController } from './chat'
|
||||
export class EventController {
|
||||
static create() {
|
||||
|
||||
}
|
||||
|
||||
static edit() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
static async createOrFindGroupFromEvent(name, attendees) {
|
||||
// chatController.
|
||||
const {data, roomName} = await ChatController.createGroup(name)
|
||||
|
||||
const roomId = data.rid
|
||||
|
||||
if (data.error.error == "error-duplicate-channel-name") {
|
||||
const getGroupByName = ChatController.ChatSystemService.getGroupByName(roomName)
|
||||
if(getGroupByName) {
|
||||
return getGroupByName
|
||||
}
|
||||
} else if (roomId) {
|
||||
const room = await ChatController.ChatSystemService.waitRoomToCreate(roomId)
|
||||
|
||||
const chatUsers: chatUser[] = []
|
||||
|
||||
for (let webTRIXUser of attendees ) {
|
||||
const username = webTRIXUser.EmailAddress.split("@")[0];
|
||||
const name = webTRIXUser.Name
|
||||
|
||||
const findChatUser = ChatController.ChatSystemService.searchContact(name, username)
|
||||
if(findChatUser) {
|
||||
chatUsers.push(findChatUser)
|
||||
}
|
||||
}
|
||||
|
||||
for (let chatUser of chatUsers) {
|
||||
room.addContacts(chatUser._id)
|
||||
}
|
||||
|
||||
return room
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export class DispatchController {
|
||||
|
||||
}
|
||||
@@ -8,6 +8,7 @@ export class MessageModel extends models.Model {
|
||||
msg = models.CharField()
|
||||
sendAttempt = models.IntegerField()
|
||||
rid = models.CharField()
|
||||
t = models.CharField({default:'', blank: true})
|
||||
ts = JsonField({blank:true})
|
||||
u = JsonField()
|
||||
_id = models.CharField({blank:true})
|
||||
@@ -75,3 +76,27 @@ models.register({
|
||||
version: 14,
|
||||
models: [PublicationModel, ActionModel]
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
export class WebtrixUserModel extends models.Model {
|
||||
FullName = models.CharField()
|
||||
Role = models.CharField()
|
||||
}
|
||||
|
||||
models.register({
|
||||
databaseName: 'webtrix'+environment.version.lastCommitNumber + environment.id,
|
||||
type: 'indexedDB',
|
||||
version: 1,
|
||||
models: [WebtrixUserModel]
|
||||
})
|
||||
|
||||
|
||||
models.register({
|
||||
databaseName: 'actions'+environment.version.lastCommitNumber + environment.id,
|
||||
type: 'indexedDB',
|
||||
version: 14,
|
||||
models: [PublicationModel, ActionModel]
|
||||
})
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
</mat-option>
|
||||
|
||||
<mat-option value="PR+MDGPR" *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks])">
|
||||
<mat-option value="PR+MDGPR" *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks]) && environment.presidential">
|
||||
PR+MDGPR
|
||||
</mat-option>
|
||||
|
||||
|
||||
@@ -632,19 +632,25 @@ export class AgendaPage implements OnInit {
|
||||
]
|
||||
|
||||
} else if (Oficial) {
|
||||
return [{
|
||||
OwnerId: calendar.OwnerId,
|
||||
CalendarId : Oficial,
|
||||
CalendarName: calendar.CalendarName
|
||||
}]
|
||||
|
||||
try {
|
||||
return [{
|
||||
OwnerId: calendar.OwnerId,
|
||||
CalendarId : Oficial,
|
||||
CalendarName: calendar.CalendarName
|
||||
}]
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
} else {
|
||||
return [{
|
||||
OwnerId: calendar.OwnerId,
|
||||
CalendarId : Pessoal,
|
||||
CalendarName: calendar.CalendarName
|
||||
}]
|
||||
|
||||
try {
|
||||
return [{
|
||||
OwnerId: calendar.OwnerId,
|
||||
CalendarId : Pessoal,
|
||||
CalendarName: calendar.CalendarName
|
||||
}]
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -78,14 +78,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div *ngIf="Form && validateFrom" >
|
||||
<div *ngIf="Form.get('CalendarName').invalid " class="input-errror-message">
|
||||
<div *ngIf="Form.get('CalendarName').errors?.required">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2 d-flex">
|
||||
<div class="ion-icon-class">
|
||||
|
||||
@@ -149,7 +149,7 @@ export class ViewEventPage implements OnInit {
|
||||
// });
|
||||
// }
|
||||
|
||||
|
||||
openOptions() {}
|
||||
close() {
|
||||
|
||||
this.modalController.dismiss(this.isEventEdited);
|
||||
|
||||
@@ -96,7 +96,6 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
private toastService: ToastService,
|
||||
public ThemeService: ThemeService,
|
||||
private changeDetectorRef: ChangeDetectorRef,
|
||||
private sqlservice: SqliteService,
|
||||
private platform: Platform,
|
||||
public ChatSystemService: ChatSystemService,
|
||||
private storage: Storage,
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { GroupChatPage } from './group-chat.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: GroupChatPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class GroupChatPageRoutingModule {}
|
||||
@@ -1,27 +0,0 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { GroupChatPageRoutingModule } from './group-chat-routing.module';
|
||||
|
||||
import { GroupChatPage } from './group-chat.page';
|
||||
import { SharedModule } from 'src/app/shared/shared.module';
|
||||
|
||||
import { BtnSeguintePageModule } from 'src/app/shared/btn-seguinte/btn-seguinte.module';
|
||||
import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-modal-dismiss.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
|
||||
GroupChatPageRoutingModule,
|
||||
BtnSeguintePageModule,
|
||||
BtnModalDismissPageModule,
|
||||
],
|
||||
declarations: [GroupChatPage]
|
||||
})
|
||||
export class GroupChatPageModule {}
|
||||
@@ -1,17 +0,0 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-toolbar class="header-toolbar">
|
||||
<div class="main-header">
|
||||
<div class="title-content">
|
||||
<app-btn-modal-dismiss></app-btn-modal-dismiss>
|
||||
<div class="middle">
|
||||
<ion-label class="title">Novo Grupo</ion-label>
|
||||
</div>
|
||||
<app-btn-seguinte></app-btn-seguinte>
|
||||
</div>
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
|
||||
</ion-content>
|
||||
@@ -1,24 +0,0 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { GroupChatPage } from './group-chat.page';
|
||||
|
||||
describe('GroupChatPage', () => {
|
||||
let component: GroupChatPage;
|
||||
let fixture: ComponentFixture<GroupChatPage>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ GroupChatPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(GroupChatPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -1,15 +0,0 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-group-chat',
|
||||
templateUrl: './group-chat.page.html',
|
||||
styleUrls: ['./group-chat.page.scss'],
|
||||
})
|
||||
export class GroupChatPage implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,10 +11,6 @@ const routes: Routes = [
|
||||
{
|
||||
path: 'contacts',
|
||||
loadChildren: () => import('./contacts/contacts.module').then( m => m.ContactsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'group-chat',
|
||||
loadChildren: () => import('./group-chat/group-chat.module').then( m => m.GroupChatPageModule)
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
-3
@@ -104,12 +104,9 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private router:Router,
|
||||
private processes:ProcessesService,
|
||||
private attachmentsService: AttachmentsService,
|
||||
private navParams: NavParams,
|
||||
private alertController: AlertService,
|
||||
private userAuth: AuthService,
|
||||
private toastService: ToastService,
|
||||
private despachoService: DespachoService,
|
||||
public ThemeService: ThemeService,
|
||||
|
||||
-16
@@ -109,22 +109,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div *ngIf="task && p.userRole(['PR'])" class="aside-right flex-column height-100 overflow-y-auto">
|
||||
|
||||
<div class="buttons">
|
||||
<button (click)="openExpedientActionsModal('0', fulltask)" class="btn-cancel" shape="round" >Efetuar Despacho</button>
|
||||
<button (click)="distartExpedientModal('descartar')" class="btn-cancel" shape="round" >Arquivar</button>
|
||||
<div class="solid"></div>
|
||||
<button (click)="openExpedientActionsModal('1',fulltask)" class="btn-cancel" shape="round" >Solicitar Parecer</button>
|
||||
<button (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
|
||||
<button (click)="sendExpedienteToPending()" *ngIf="task.Status != 'Pending'" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
|
||||
<button (click)="openNewGroupPage()" class="btn-cancel" shape="round" >Iniciar Conversa</button>
|
||||
<div hidden class="solid"></div>
|
||||
<button hidden class="btn-cancel" shape="round" >Delegar</button>
|
||||
</div>
|
||||
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
|
||||
<div *ngIf="!task" class="main-content d-flex height-100 overflow-hidden">
|
||||
|
||||
@@ -33,7 +33,6 @@ import { DataService } from 'src/app/services/data.service';
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { Storage } from '@ionic/storage';
|
||||
import { LoginUserRespose } from 'src/app/models/user.model';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
|
||||
import { TaskService } from 'src/app/services/task.service';
|
||||
@@ -71,9 +70,6 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
|
||||
constructor(
|
||||
private processes: ProcessesService,
|
||||
private iab: InAppBrowser,
|
||||
//private attachments: AttachmentsService,
|
||||
private events: EventsService,
|
||||
private router: Router,
|
||||
private modalController: ModalController,
|
||||
public popoverController: PopoverController,
|
||||
@@ -84,12 +80,9 @@ export class ExpedienteDetailPage implements OnInit {
|
||||
public p: PermissionService,
|
||||
private expedienteService: ExpedienteService,
|
||||
public platform: Platform,
|
||||
private sqliteservice: SqliteService,
|
||||
private backgroundservice: BackgroundService,
|
||||
public ThemeService: ThemeService,
|
||||
private dataService: DataService,
|
||||
private storage: Storage,
|
||||
private userAuth: AuthService,
|
||||
private httpErroHandle: HttpErrorHandle,
|
||||
private eventTriger: EventTrigger,
|
||||
public TaskService: TaskService
|
||||
|
||||
@@ -421,7 +421,7 @@ export class PedidoPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
async newGroup(){
|
||||
async newGroup() {
|
||||
const modal = await this.modalController.create({
|
||||
component: NewGroupPage,
|
||||
cssClass: 'modal modal-desktop',
|
||||
|
||||
@@ -20,6 +20,7 @@ import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { NetworkServiceService} from 'src/app/services/network-service.service';
|
||||
import { ViewedMessageService } from './viewed-message.service'
|
||||
import { NotificationsService } from '../notifications.service';
|
||||
import { Subscribe } from '../subcribe';
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@@ -42,6 +43,9 @@ export class ChatSystemService {
|
||||
delete = []
|
||||
loadingUsers = false
|
||||
|
||||
onRoomsLoad = new Subscribe({execute : false, deleteOnExecute: true})
|
||||
|
||||
|
||||
constructor(
|
||||
private RochetChatConnectorService: RochetChatConnectorService,
|
||||
private storage: Storage,
|
||||
@@ -299,7 +303,6 @@ export class ChatSystemService {
|
||||
|
||||
this.loadingWholeList = false
|
||||
await this.storage.set('Rooms', rooms);
|
||||
console.log('this._group', this._group)
|
||||
|
||||
this.sortRoomList()
|
||||
|
||||
@@ -311,6 +314,7 @@ export class ChatSystemService {
|
||||
this.sortRoomList()
|
||||
}, 10000)
|
||||
|
||||
this.onRoomsLoad.executor()
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -687,4 +691,46 @@ export class ChatSystemService {
|
||||
return this.RochetChatConnectorService.getUserOfRoom(roomId);
|
||||
}
|
||||
|
||||
|
||||
async createGroup(name) {
|
||||
const res: any = await this.createPrivateRoom(name, SessionStore.user.UserName, {});
|
||||
console.log('room is created', res)
|
||||
if(res?.result?.rid) {
|
||||
try {
|
||||
await this.getAllRooms();
|
||||
} catch (e) {}
|
||||
console.log('room is loaded')
|
||||
return res
|
||||
} else {
|
||||
return res
|
||||
}
|
||||
}
|
||||
|
||||
getGroupByName(name ) {
|
||||
return this._group.find( e=> e.name == name)
|
||||
}
|
||||
|
||||
async waitRoomToCreate(rid): Promise<RoomService> {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
let sub;
|
||||
|
||||
sub = this.onRoomsLoad.subscribe(() => {
|
||||
const room = this.getRoomById(rid)
|
||||
if (room) {
|
||||
resolve(room)
|
||||
sub.unSubscribe()
|
||||
}
|
||||
})
|
||||
|
||||
try {
|
||||
await this.getAllRooms();
|
||||
} catch (e) {}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
searchContact(name, username) {
|
||||
return this.users.find( e=> e.name == name || e.username == username)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -943,4 +943,14 @@ export class RoomService {
|
||||
this.messageUnread = false
|
||||
}
|
||||
|
||||
addContacts(userId:any) {
|
||||
|
||||
let body = {
|
||||
"roomId": this.id,
|
||||
"userId": userId,
|
||||
}
|
||||
|
||||
return this.chatService.addUserToGroup(body).toPromise();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -254,6 +254,24 @@ export class EventsService {
|
||||
}
|
||||
|
||||
|
||||
for (let OwnerCalendar of SessionStore.user.OwnerCalendars) {
|
||||
this.hasAnyCalendar = true
|
||||
|
||||
this.calendarNames[OwnerCalendar.CalendarId] = 'Meu calendario'
|
||||
|
||||
if(!this.calendarNamesAry.includes('Meu calendario')) {
|
||||
this.calendarNamesAry.push('Meu calendario')
|
||||
this.calendarNamesAryNoPr.push('Meu calendario')
|
||||
this.calendarNamesType['Meu calendario'] = {}
|
||||
}
|
||||
|
||||
this.calendarNamesType['Meu calendario'][OwnerCalendar.CalendarName] = true
|
||||
this.calendarNamesType['Meu calendario'][OwnerCalendar.CalendarName+'Id'] = OwnerCalendar.CalendarId
|
||||
this.calendarNamesType['Meu calendario']['RoleId'] = OwnerCalendar.CalendarRoleId
|
||||
this.calendarNamesType['Meu calendario']['OwnerId'] = OwnerCalendar.OwnerUserId || SessionStore.user.UserId
|
||||
}
|
||||
|
||||
|
||||
for (let sharedCalendar of SessionStore.user.SharedCalendars) {
|
||||
this.hasAnyCalendar = true
|
||||
if(sharedCalendar?.OwnerUserId) {
|
||||
@@ -291,23 +309,6 @@ export class EventsService {
|
||||
|
||||
}
|
||||
|
||||
for (let OwnerCalendar of SessionStore.user.OwnerCalendars) {
|
||||
this.hasAnyCalendar = true
|
||||
|
||||
this.calendarNames[OwnerCalendar.CalendarId] = 'Meu calendario'
|
||||
|
||||
if(!this.calendarNamesAry.includes('Meu calendario')) {
|
||||
this.calendarNamesAry.push('Meu calendario')
|
||||
this.calendarNamesAryNoPr.push('Meu calendario')
|
||||
this.calendarNamesType['Meu calendario'] = {}
|
||||
}
|
||||
|
||||
this.calendarNamesType['Meu calendario'][OwnerCalendar.CalendarName] = true
|
||||
this.calendarNamesType['Meu calendario'][OwnerCalendar.CalendarName+'Id'] = OwnerCalendar.CalendarId
|
||||
this.calendarNamesType['Meu calendario']['RoleId'] = OwnerCalendar.CalendarRoleId
|
||||
this.calendarNamesType['Meu calendario']['OwnerId'] = OwnerCalendar.OwnerUserId || SessionStore.user.UserId
|
||||
}
|
||||
|
||||
|
||||
if(SessionStore.user.OwnerCalendars.length == 0 && SessionStore.user.SharedCalendars.length == 0) {
|
||||
this.hasAnyCalendar = false
|
||||
|
||||
@@ -14,14 +14,26 @@
|
||||
</div>
|
||||
|
||||
<div class="div-icon d-flex align-base">
|
||||
<button class="btn-no-color" (click)="editEvent()">
|
||||
<!-- <button class="btn-no-color" (click)="editEvent()">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="edit" slot="end" src="assets/images/icons-edit.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="edit" slot="end" src="assets/images/theme/gov/icons-edit.svg" ></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " class="edit" slot="end" src="assets/images/theme/{{ThemeService.currentTheme}}/icons-edit.svg" ></ion-icon>
|
||||
</button>
|
||||
<button class="btn-no-color" (click)="deleteYesOrNo()">
|
||||
<ion-icon class="delete" name="trash-sharp"></ion-icon>
|
||||
</button>
|
||||
</button> -->
|
||||
|
||||
<div class="div-icon" (click)="openOptions()">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-menu.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'doneIt' " src="assets/images/theme/{{ThemeService.currentTheme}}/icons-menu.svg"></ion-icon>
|
||||
</div>
|
||||
<div *ngIf="loadedEvent.Subject">
|
||||
<div (click)="editEvent()">Editar</div>
|
||||
<div (click)="deleteYesOrNo()">Apagar</div>
|
||||
<div id="desktop-create-chat-from-event" (click)="openNewGroupPage()">Criar Conversa</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -15,8 +15,8 @@ import { ViewDocumentPage } from 'src/app/modals/view-document/view-document.pag
|
||||
import { ThemeService } from 'src/app/services/theme.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service'
|
||||
|
||||
|
||||
import { NavigationExtras, Router } from '@angular/router';
|
||||
import { EventController } from 'src/app/controller/event'
|
||||
@Component({
|
||||
selector: 'app-view-event',
|
||||
templateUrl: './view-event.page.html',
|
||||
@@ -59,7 +59,8 @@ export class ViewEventPage implements OnInit {
|
||||
public popoverController: PopoverController,
|
||||
private toastService: ToastService,
|
||||
public ThemeService: ThemeService,
|
||||
private httpErrorHandle: HttpErrorHandle
|
||||
private httpErrorHandle: HttpErrorHandle,
|
||||
private router: Router,
|
||||
) {
|
||||
this.isEventEdited = false;
|
||||
this.loadedEvent = new Event();
|
||||
@@ -95,6 +96,17 @@ export class ViewEventPage implements OnInit {
|
||||
this.dicIndex = index;
|
||||
}
|
||||
|
||||
|
||||
async openNewGroupPage() {
|
||||
let roomName = this.loadedEvent.Subject
|
||||
let attendees = this.loadedEvent.Attendees
|
||||
|
||||
const room = await EventController.createOrFindGroupFromEvent(roomName, attendees)
|
||||
|
||||
let navigationExtras: NavigationExtras = { queryParams: { "roomId": room.id } };
|
||||
this.router.navigate(['/home/chat'], navigationExtras);
|
||||
}
|
||||
|
||||
close() {
|
||||
|
||||
this.viewEventDetailDismiss.emit({
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { GroupChatPage } from './group-chat.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: GroupChatPage
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class GroupChatPageRoutingModule {}
|
||||
@@ -1,25 +0,0 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { GroupChatPageRoutingModule } from './group-chat-routing.module';
|
||||
|
||||
import { GroupChatPage } from './group-chat.page';
|
||||
import { SharedModule } from 'src/app/shared/shared.module';
|
||||
import { BtnSeguintePageModule } from 'src/app/shared/btn-seguinte/btn-seguinte.module';
|
||||
import { BtnModalDismissPageModule } from 'src/app/shared/btn-modal-dismiss/btn-modal-dismiss.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
GroupChatPageRoutingModule,
|
||||
BtnSeguintePageModule,
|
||||
BtnModalDismissPageModule,
|
||||
],
|
||||
declarations: [GroupChatPage]
|
||||
})
|
||||
export class GroupChatPageModule {}
|
||||
@@ -1,17 +0,0 @@
|
||||
<ion-header class="ion-no-border">
|
||||
<ion-toolbar class="header-toolbar">
|
||||
<div class="main-header">
|
||||
<div class="title-content">
|
||||
<app-btn-modal-dismiss></app-btn-modal-dismiss>
|
||||
<div class="middle">
|
||||
<ion-label class="title">Novo Grupo</ion-label>
|
||||
</div>
|
||||
<app-btn-seguinte></app-btn-seguinte>
|
||||
</div>
|
||||
</div>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content>
|
||||
|
||||
</ion-content>
|
||||
@@ -1,24 +0,0 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { GroupChatPage } from './group-chat.page';
|
||||
|
||||
describe('GroupChatPage', () => {
|
||||
let component: GroupChatPage;
|
||||
let fixture: ComponentFixture<GroupChatPage>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ GroupChatPage ],
|
||||
imports: [IonicModule.forRoot()]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(GroupChatPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -1,15 +0,0 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-group-chat',
|
||||
templateUrl: './group-chat.page.html',
|
||||
styleUrls: ['./group-chat.page.scss'],
|
||||
})
|
||||
export class GroupChatPage implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -13,9 +13,6 @@ const routes: Routes = [
|
||||
loadChildren: () => import('./contacts/contacts.module').then( m => m.ContactsPageModule)
|
||||
},
|
||||
{
|
||||
path: 'group-chat',
|
||||
loadChildren: () => import('./group-chat/group-chat.module').then( m => m.GroupChatPageModule)
|
||||
},
|
||||
path: 'group-contacts',
|
||||
loadChildren: () => import('./group-contacts/group-contacts.module').then( m => m.GroupContactsPageModule)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { ModalController, PickerController, PopoverController } from '@ionic/angular';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
|
||||
import { DataService } from 'src/app/services/data.service';
|
||||
import { GroupDurationPage } from 'src/app/shared/popover/group-duration/group-duration.page';
|
||||
@@ -9,7 +8,6 @@ import { GroupContactsPage } from '../group-messages/group-contacts/group-contac
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service';
|
||||
import { RouteService } from 'src/app/services/route.service';
|
||||
import { Router } from '@angular/router';
|
||||
@Component({
|
||||
selector: 'app-new-group',
|
||||
templateUrl: './new-group.page.html',
|
||||
@@ -25,9 +23,15 @@ export class NewGroupPage implements OnInit{
|
||||
selectedDuration = ['','',''];
|
||||
countDownTime:any;
|
||||
task:any;
|
||||
event: any
|
||||
link = ''
|
||||
documents: any;
|
||||
loggedUserChat: any;
|
||||
contact: {
|
||||
Email: string
|
||||
DisplayName: string
|
||||
}[]
|
||||
|
||||
@Input() roomId: string;
|
||||
|
||||
@Input() groupName:string;
|
||||
@@ -41,9 +45,7 @@ export class NewGroupPage implements OnInit{
|
||||
private popoverController: PopoverController,
|
||||
private modalController: ModalController,
|
||||
private dataService:DataService,
|
||||
private router: Router,
|
||||
public ChatSystemService: ChatSystemService,
|
||||
private authService: AuthService,
|
||||
private toastService: ToastService,
|
||||
public ThemeService: ThemeService,
|
||||
private RouteService: RouteService,
|
||||
@@ -55,12 +57,24 @@ export class NewGroupPage implements OnInit{
|
||||
|
||||
ngOnInit() {
|
||||
this.task = this.dataService.get("task");
|
||||
this.event = this.dataService.get("event");
|
||||
|
||||
if(this.task) {
|
||||
this.link = this.dataService.get("link");
|
||||
this.groupName = this.task.Folio;
|
||||
this.documents = this.dataService.get("documents");
|
||||
this.dataService.set("newGroup", false);
|
||||
this.dataService.set("link", false);
|
||||
} else if (this.event) {
|
||||
//
|
||||
this.link = this.dataService.get("link");
|
||||
this.groupName = this.event.Subject;
|
||||
this.documents = this.dataService.get("documents");
|
||||
this.contact = this.dataService.get("contacts");
|
||||
//
|
||||
this.dataService.set("newGroup", false);
|
||||
this.dataService.set("link", false);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -194,7 +208,7 @@ export class NewGroupPage implements OnInit{
|
||||
}, 150);
|
||||
}
|
||||
|
||||
async addContacts(){
|
||||
async addContacts() {
|
||||
this.close();
|
||||
|
||||
let name = this.groupName.split(' ').join('-');
|
||||
@@ -225,7 +239,7 @@ export class NewGroupPage implements OnInit{
|
||||
return await popover.present();
|
||||
}
|
||||
|
||||
async showPicker(){
|
||||
async showPicker() {
|
||||
const picker = await this.pickerController.create({
|
||||
cssClass: '',
|
||||
buttons: [
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { eventSource } from '../models/agenda/eventSource';
|
||||
import { SHA1, SHA256, AES, enc } from 'crypto-js'
|
||||
import { SHA1 } from 'crypto-js'
|
||||
import { localstoreService } from './localstore.service'
|
||||
import { EventList, EventListStore } from '../models/agenda/AgendaEventList';
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
export let versionData = {
|
||||
"shortSHA": "64e0760e6",
|
||||
"SHA": "64e0760e62ceed30deb8022c7a95cbc831193e81",
|
||||
"shortSHA": "f849610b8",
|
||||
"SHA": "f849610b8c6e4815d2c8536b544ac0dac7a7b278",
|
||||
"branch": "feature/gabinete-search",
|
||||
"lastCommitAuthor": "'Peter Maquiran'",
|
||||
"lastCommitTime": "'Wed Jun 14 13:44:26 2023 +0100'",
|
||||
"lastCommitMessage": "select calendar by default",
|
||||
"lastCommitNumber": "5015",
|
||||
"lastCommitTime": "'Mon Jun 19 12:15:39 2023 +0100'",
|
||||
"lastCommitMessage": "change home",
|
||||
"lastCommitNumber": "5016",
|
||||
"change": "",
|
||||
"changeStatus": "On branch feature/gabinete-search\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/pages/events/events.page.html\n\tmodified: src/app/pages/events/events.page.scss\n\tmodified: src/app/pages/gabinete-digital/event-list/event-list.page.ts\n\tmodified: src/app/pages/login/login.page.ts\n\tmodified: src/app/pipes/custom-task.pipe.ts\n\tmodified: src/app/pipes/expediente-task.pipe.ts\n\tmodified: src/app/services/chat/chat-system.service.ts\n\tmodified: src/app/services/events.service.ts\n\tmodified: src/app/shared/agenda/event-list/event-list.page.ts\n\tmodified: src/app/shared/chat/group-messages/group-messages.page.html\n\tmodified: src/app/shared/chat/messages/messages.page.html\n\tmodified: src/app/shared/chat/messages/messages.page.ts\n\tmodified: src/app/shared/gabinete-digital/all-processes/all-processes.page.html\n\tmodified: src/app/shared/gabinete-digital/all-processes/all-processes.page.scss\n\tmodified: src/app/shared/gabinete-digital/all-processes/all-processes.page.ts\n\tmodified: src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.html\n\tmodified: src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.ts\n\tmodified: src/app/shared/popover/chat-options-popover/chat-options-popover.page.html\n\tmodified: src/environments/environment.prod.ts",
|
||||
"changeStatus": "On branch feature/gabinete-search\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: .gitignore\n\tmodified: src/app/app.component.ts\n\tnew file: src/app/controller/chat.ts\n\tnew file: src/app/controller/event.ts\n\tnew file: src/app/controller/process/dispactch.ts\n\tmodified: src/app/models/beast-orm.ts\n\tmodified: src/app/pages/agenda/agenda.page.html\n\tmodified: src/app/pages/agenda/agenda.page.ts\n\tmodified: src/app/pages/agenda/new-event/new-event.page.html\n\tmodified: src/app/pages/agenda/view-event/view-event.page.ts\n\tmodified: src/app/pages/chat/group-messages/group-messages.page.ts\n\tdeleted: src/app/pages/chat/new-group/group-chat/group-chat-routing.module.ts\n\tdeleted: src/app/pages/chat/new-group/group-chat/group-chat.module.ts\n\tdeleted: src/app/pages/chat/new-group/group-chat/group-chat.page.html\n\tdeleted: src/app/pages/chat/new-group/group-chat/group-chat.page.scss\n\tdeleted: src/app/pages/chat/new-group/group-chat/group-chat.page.spec.ts\n\tdeleted: src/app/pages/chat/new-group/group-chat/group-chat.page.ts\n\tmodified: src/app/pages/chat/new-group/new-group-routing.module.ts\n\tmodified: src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts\n\tmodified: src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.html\n\tmodified: src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts\n\tmodified: src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts\n\tmodified: src/app/services/chat/chat-system.service.ts\n\tmodified: src/app/services/chat/room.service.ts\n\tmodified: src/app/services/events.service.ts\n\tmodified: src/app/shared/agenda/view-event/view-event.page.html\n\tmodified: src/app/shared/agenda/view-event/view-event.page.ts\n\tdeleted: src/app/shared/chat/new-group/group-chat/group-chat-routing.module.ts\n\tdeleted: src/app/shared/chat/new-group/group-chat/group-chat.module.ts\n\tdeleted: src/app/shared/chat/new-group/group-chat/group-chat.page.html\n\tdeleted: src/app/shared/chat/new-group/group-chat/group-chat.page.scss\n\tdeleted: src/app/shared/chat/new-group/group-chat/group-chat.page.spec.ts\n\tdeleted: src/app/shared/chat/new-group/group-chat/group-chat.page.ts\n\tmodified: src/app/shared/chat/new-group/new-group-routing.module.ts\n\tmodified: src/app/shared/chat/new-group/new-group.page.ts\n\tmodified: src/app/store/calendar.service.ts",
|
||||
"changeAuthor": "peter.maquiran"
|
||||
}
|
||||
Reference in New Issue
Block a user