mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Merge branch 'feature/viewer-attachment' of https://bitbucket.org/equilibriumito/gabinete-digital-fo into feature/viewer-attachment
This commit is contained in:
@@ -242,7 +242,6 @@
|
|||||||
>
|
>
|
||||||
|
|
||||||
<div class="schedule-time" *ngIf="!event.event.IsAllDayEvent">
|
<div class="schedule-time" *ngIf="!event.event.IsAllDayEvent">
|
||||||
|
|
||||||
<div *ngIf="event.startMany && !event.middle" class="time-start labelb">Início</div>
|
<div *ngIf="event.startMany && !event.middle" class="time-start labelb">Início</div>
|
||||||
<div *ngIf="event.endMany && !event.middle " class="time-end labelb">Fim</div>
|
<div *ngIf="event.endMany && !event.middle " class="time-end labelb">Fim</div>
|
||||||
|
|
||||||
@@ -254,8 +253,17 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="schedule-time" *ngIf="event.event.IsAllDayEvent">
|
<div class="schedule-time" *ngIf="event.event.IsAllDayEvent">
|
||||||
<div class="time-start">Todo </div>
|
|
||||||
<div class="time-end text-center">o dia</div>
|
<div *ngIf="event.middle" class="time-start">Todo </div>
|
||||||
|
<div *ngIf="event.middle" class="time-end text-center">o dia</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div *ngIf="!event.middle && !(event.endMany && !event.middle)" class="time-start">Todo </div>
|
||||||
|
<div *ngIf="!event.middle && !(event.endMany && !event.middle)" class="time-end text-center">o dia </div>
|
||||||
|
|
||||||
|
<div *ngIf="event.endMany && !event.middle" class="time-start">{{event.event.StartDate | date: 'HH:mm'}}</div>
|
||||||
|
<div *ngIf="event.endMany && !event.middle" class="time-end"> {{event.event.EndDate | date: 'HH:mm'}} </div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="schedule-details">
|
<div class="schedule-details">
|
||||||
<div class="description">
|
<div class="description">
|
||||||
|
|||||||
@@ -146,7 +146,6 @@ export class LoginPage implements OnInit {
|
|||||||
|
|
||||||
await this.authService.loginToChatWs();
|
await this.authService.loginToChatWs();
|
||||||
this.ChatService.setheader()
|
this.ChatService.setheader()
|
||||||
this.ChatSystemService.loadChat();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,7 +180,6 @@ export class LoginPage implements OnInit {
|
|||||||
if (attempt.ChatData) {
|
if (attempt.ChatData) {
|
||||||
await this.authService.loginToChatWs();
|
await this.authService.loginToChatWs();
|
||||||
this.ChatService.setheader();
|
this.ChatService.setheader();
|
||||||
this.ChatSystemService.loadChat();
|
|
||||||
}
|
}
|
||||||
this.storageService.remove("Notifications")
|
this.storageService.remove("Notifications")
|
||||||
this.getToken();
|
this.getToken();
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import { PublicationVideoManagerService } from "src/app/services/publication/pub
|
|||||||
import { StopvideoService } from "src/app/services/stopvideo.service"
|
import { StopvideoService } from "src/app/services/stopvideo.service"
|
||||||
import { Result } from 'neverthrow';
|
import { Result } from 'neverthrow';
|
||||||
import { App } from '@capacitor/app';
|
import { App } from '@capacitor/app';
|
||||||
|
import { ActiveTabService } from 'src/app/services/active-tab.service';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-view-publications',
|
selector: 'app-view-publications',
|
||||||
templateUrl: './view-publications.page.html',
|
templateUrl: './view-publications.page.html',
|
||||||
@@ -69,7 +70,8 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
public checkFileType: checkFileTypeService,
|
public checkFileType: checkFileTypeService,
|
||||||
private publicationVideoManagerService: PublicationVideoManagerService,
|
private publicationVideoManagerService: PublicationVideoManagerService,
|
||||||
public stopvideoService: StopvideoService,
|
public stopvideoService: StopvideoService,
|
||||||
private platform: Platform,) {
|
private platform: Platform,
|
||||||
|
public activeTabService: ActiveTabService) {
|
||||||
|
|
||||||
|
|
||||||
/* this.publicationVideoManagerService.setContainer(this.VideoManager.nativeElement) */
|
/* this.publicationVideoManagerService.setContainer(this.VideoManager.nativeElement) */
|
||||||
@@ -118,6 +120,13 @@ export class ViewPublicationsPage implements OnInit {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// console.log(this.publicationFolderService.publicationList[this.folderId])
|
// console.log(this.publicationFolderService.publicationList[this.folderId])
|
||||||
|
|
||||||
|
setTimeout(()=> {
|
||||||
|
|
||||||
|
this.doRefresh({})
|
||||||
|
|
||||||
|
}, 1500)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ export class ActiveTabService {
|
|||||||
gabineteDetails: false
|
gabineteDetails: false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updatePublications = () => {}
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private router: Router,
|
private router: Router,
|
||||||
public HeaderSettingsService: HeaderSettingsService) {
|
public HeaderSettingsService: HeaderSettingsService) {
|
||||||
@@ -47,6 +49,13 @@ export class ActiveTabService {
|
|||||||
|
|
||||||
} else if (pathName.startsWith('/home/publications')) {
|
} else if (pathName.startsWith('/home/publications')) {
|
||||||
this.pages.publication = true
|
this.pages.publication = true
|
||||||
|
if(pathName.includes("/publications/")) {
|
||||||
|
if(this.updatePublications) {
|
||||||
|
this.updatePublications()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
} else if (pathName.startsWith('/home/chat')) {
|
} else if (pathName.startsWith('/home/chat')) {
|
||||||
this.pages.chat = true
|
this.pages.chat = true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,8 +67,6 @@ export class ListBoxService {
|
|||||||
// object[momentG(new Date(e.start), 'MMMM yyyy')].push(e)
|
// object[momentG(new Date(e.start), 'MMMM yyyy')].push(e)
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// console.log({object})
|
|
||||||
|
|
||||||
// const daysStringNum = Object.keys(object).reverse()
|
// const daysStringNum = Object.keys(object).reverse()
|
||||||
|
|
||||||
// const daysObject = {}
|
// const daysObject = {}
|
||||||
@@ -77,13 +75,8 @@ export class ListBoxService {
|
|||||||
// daysObject[day] = object[day]
|
// daysObject[day] = object[day]
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// console.log({daysObject})
|
|
||||||
|
|
||||||
|
|
||||||
return this.display(newStracture, selectedDate).year
|
return this.display(newStracture, selectedDate).year
|
||||||
|
|
||||||
// console.log({daysObject})
|
|
||||||
|
|
||||||
// const daysStringNum = Object.keys(daysObject)
|
// const daysStringNum = Object.keys(daysObject)
|
||||||
|
|
||||||
// for(const day of daysStringNum) {
|
// for(const day of daysStringNum) {
|
||||||
@@ -105,6 +98,8 @@ export class ListBoxService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
display(list: CustomCalendarEvent[], selectedDate) {
|
display(list: CustomCalendarEvent[], selectedDate) {
|
||||||
|
|
||||||
|
|
||||||
let days = {};
|
let days = {};
|
||||||
const year: Year[] = []
|
const year: Year[] = []
|
||||||
|
|
||||||
@@ -171,14 +166,14 @@ export class ListBoxService {
|
|||||||
// last push
|
// last push
|
||||||
const EndEvent = this.transForm(cloneEvent, {startMany: false, endMany: true, middle: false})
|
const EndEvent = this.transForm(cloneEvent, {startMany: false, endMany: true, middle: false})
|
||||||
if(this.CanPush(cloneEvent, selectedDate) && cloneEvent.start.getTime() >= cloneSelectedDate.getTime()) {
|
if(this.CanPush(cloneEvent, selectedDate) && cloneEvent.start.getTime() >= cloneSelectedDate.getTime()) {
|
||||||
days[otherDays].push(EndEvent) ; this.push(cloneEvent, year)
|
days[otherDays].push(EndEvent) ; this.push(EndEvent, year)
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
const EndEvent = this.transForm(cloneEvent, {startMany: false,endMany: true, middle: true})
|
const EndEvent = this.transForm(cloneEvent, {startMany: false,endMany: true, middle: true})
|
||||||
if(this.CanPush(cloneEvent, selectedDate) && cloneEvent.start.getTime() >= cloneSelectedDate.getTime()) {
|
if(this.CanPush(cloneEvent, selectedDate) && cloneEvent.start.getTime() >= cloneSelectedDate.getTime()) {
|
||||||
days[otherDays].push(EndEvent) ; this.push(cloneEvent, year)
|
days[otherDays].push(EndEvent) ; this.push(EndEvent, year)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,6 +190,7 @@ export class AuthService {
|
|||||||
SessionStore.user.RochetChatUserId = message.result.id
|
SessionStore.user.RochetChatUserId = message.result.id
|
||||||
SessionStore.save()
|
SessionStore.save()
|
||||||
|
|
||||||
|
this.ChatSystemService.loadChat()
|
||||||
this.RochetChatConnectorService.setStatus('online')
|
this.RochetChatConnectorService.setStatus('online')
|
||||||
window['RochetChatConnectorService'] = this.RochetChatConnectorService
|
window['RochetChatConnectorService'] = this.RochetChatConnectorService
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -199,7 +200,14 @@ export class AuthService {
|
|||||||
|
|
||||||
|
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
// console.error(SessionStore.user.ChatData, 'web socket login',error)
|
console.error(SessionStore.user.ChatData, 'web socket login', error)
|
||||||
|
|
||||||
|
if(window.location.pathname.includes('/home/')) {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.loginToChatWs();
|
||||||
|
}, 4000)
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -390,32 +390,32 @@ export class ObjectMergeNotification{
|
|||||||
watchCount = 0
|
watchCount = 0
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.socket.onDisconnectCallback(()=> {
|
// this.socket.onDisconnectCallback(()=> {
|
||||||
console.log("run watch")
|
// console.log("run watch")
|
||||||
this.runWatch = true
|
// this.runWatch = true
|
||||||
this.watch()
|
// this.watch()
|
||||||
})
|
// })
|
||||||
|
|
||||||
this.socket.onConnectCallback(()=> {
|
// this.socket.onConnectCallback(()=> {
|
||||||
|
|
||||||
console.log("open trigger")
|
// console.log("open trigger")
|
||||||
this.runWatch = false
|
// this.runWatch = false
|
||||||
})
|
// })
|
||||||
|
|
||||||
this.socket.subscribe((data: socketResponse) => {
|
// this.socket.subscribe((data: socketResponse) => {
|
||||||
if(data.IsCompleted == true) {
|
// if(data.IsCompleted == true) {
|
||||||
console.log("==================!!!====================")
|
// console.log("==================!!!====================")
|
||||||
try {
|
// try {
|
||||||
this.callbacks[data.Guid](data)
|
// this.callbacks[data.Guid](data)
|
||||||
delete this.callbacks[data.Guid]
|
// delete this.callbacks[data.Guid]
|
||||||
} catch (error) {}
|
// } catch (error) {}
|
||||||
} else {
|
// } else {
|
||||||
console.log("else", data)
|
// console.log("else", data)
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
|
|
||||||
this.socket.connect();
|
// this.socket.connect();
|
||||||
this.watch()
|
// this.watch()
|
||||||
}
|
}
|
||||||
|
|
||||||
connect() {
|
connect() {
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
|||||||
documents: SearchList[] = [];
|
documents: SearchList[] = [];
|
||||||
|
|
||||||
room: any = new Array();
|
room: any = new Array();
|
||||||
roomName: any;
|
|
||||||
members: any;
|
members: any;
|
||||||
|
|
||||||
capturedImage: any;
|
capturedImage: any;
|
||||||
@@ -58,8 +57,6 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
|||||||
currentPosition: any;
|
currentPosition: any;
|
||||||
startPosition: number;
|
startPosition: number;
|
||||||
scrollToBottomBtn = false;
|
scrollToBottomBtn = false;
|
||||||
roomCountDownDate: string;
|
|
||||||
roomCountDownTime: string;
|
|
||||||
isAdmin = false;
|
isAdmin = false;
|
||||||
|
|
||||||
@Input() roomId: string;
|
@Input() roomId: string;
|
||||||
@@ -112,8 +109,6 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
|||||||
this.ChatSystemService.getUser()
|
this.ChatSystemService.getUser()
|
||||||
this.loggedUserChat = SessionStore.user.ChatData['data'];
|
this.loggedUserChat = SessionStore.user.ChatData['data'];
|
||||||
this.isGroupCreated = true;
|
this.isGroupCreated = true;
|
||||||
this.roomCountDownDate = "";
|
|
||||||
this.roomCountDownTime = "";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
ngOnChanges(changes: SimpleChanges): void {
|
ngOnChanges(changes: SimpleChanges): void {
|
||||||
@@ -151,10 +146,6 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
|||||||
return this.timeService.showDateDuration(start);
|
return this.timeService.showDateDuration(start);
|
||||||
}
|
}
|
||||||
|
|
||||||
countDownDate() {
|
|
||||||
return this.timeService.countDownDateTimer(this.roomCountDownDate, this.roomId);
|
|
||||||
}
|
|
||||||
|
|
||||||
setStatus(status: string) {
|
setStatus(status: string) {
|
||||||
let body = {
|
let body = {
|
||||||
message: '',
|
message: '',
|
||||||
@@ -377,28 +368,6 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
|||||||
this.ChatSystemService.getGroupRoom(this.roomId).loadHistory({});
|
this.ChatSystemService.getGroupRoom(this.roomId).loadHistory({});
|
||||||
}
|
}
|
||||||
|
|
||||||
let room = await this.chatService.getRoomInfo(this.roomId).toPromise();
|
|
||||||
this.room = room['room'];
|
|
||||||
if (this.room.name) {
|
|
||||||
try {
|
|
||||||
this.roomName = this.room.name.split('-').join(' ');
|
|
||||||
} catch (error) {
|
|
||||||
this.roomName = this.room.name;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if(SessionStore.user.ChatData.data.userId == this.room.u._id){
|
|
||||||
this.isAdmin = true
|
|
||||||
} else {
|
|
||||||
this.isAdmin = false
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.room.customFields.countDownDate) {
|
|
||||||
this.roomCountDownDate = this.room.customFields.countDownDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.getGroupContacts(this.room);
|
this.getGroupContacts(this.room);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -536,14 +505,6 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
if(res?.data?.name) {
|
|
||||||
try {
|
|
||||||
this.roomName = res.data.name.split('-').join(' ');
|
|
||||||
} catch (error) {
|
|
||||||
this.roomName = res.data.name
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -4,4 +4,4 @@ import { environment as doneITProd } from './suport/doneIt'
|
|||||||
import { DevDev } from './suport/dev'
|
import { DevDev } from './suport/dev'
|
||||||
|
|
||||||
|
|
||||||
export const environment: Environment = oaprProd;
|
export const environment: Environment = DevDev;
|
||||||
|
|||||||
Reference in New Issue
Block a user