mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
merge
This commit is contained in:
@@ -43,7 +43,7 @@ export class ProfilePage implements OnInit {
|
|||||||
private storageservice: StorageService,
|
private storageservice: StorageService,
|
||||||
private zone: NgZone,
|
private zone: NgZone,
|
||||||
private platform: Platform,
|
private platform: Platform,
|
||||||
private eventtrigger: EventTrigger,
|
private eventTriger: EventTrigger,
|
||||||
public ThemeService: ThemeService,
|
public ThemeService: ThemeService,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
@@ -53,6 +53,13 @@ export class ProfilePage implements OnInit {
|
|||||||
this.logoutOut = true
|
this.logoutOut = true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.eventTriger.getObservable().subscribe((event) => {
|
||||||
|
if(event.notification == "recive") {
|
||||||
|
this.getNotificationData();
|
||||||
|
}
|
||||||
|
console.log(event)
|
||||||
|
});
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.hideImage = true
|
this.hideImage = true
|
||||||
}, 2000)
|
}, 2000)
|
||||||
@@ -193,7 +200,7 @@ export class ProfilePage implements OnInit {
|
|||||||
|
|
||||||
// this.notificationservice.tempClearArray();
|
// this.notificationservice.tempClearArray();
|
||||||
this.deleteNotification(index);
|
this.deleteNotification(index);
|
||||||
this.eventtrigger.publishSomeData({
|
this.eventTriger.publishSomeData({
|
||||||
notification: "deleted"
|
notification: "deleted"
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ export interface Environment {
|
|||||||
version: version;
|
version: version;
|
||||||
sentryUrl: string;
|
sentryUrl: string;
|
||||||
despachoLabel: string
|
despachoLabel: string
|
||||||
|
despachoLabel2: string,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,12 +3,12 @@
|
|||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
<!-- Progress bar -->
|
<!-- Progress bar -->
|
||||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
<ion-content id="timeline-conteiner agenda-container pt-20" class="timeline ">
|
||||||
|
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||||
<ion-refresher-content>
|
<ion-refresher-content>
|
||||||
</ion-refresher-content>
|
</ion-refresher-content>
|
||||||
</ion-refresher>
|
</ion-refresher>
|
||||||
|
|
||||||
<ion-content id="timeline-conteiner agenda-container pt-20" class="timeline ">
|
|
||||||
<div class="d-flex container-wrapper">
|
<div class="d-flex container-wrapper">
|
||||||
|
|
||||||
<div class="calendar-timeline d-flex flex-column height-100 bg-blue">
|
<div class="calendar-timeline d-flex flex-column height-100 bg-blue">
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import { SortService } from 'src/app/services/functions/sort.service';
|
|||||||
import { ThemeService } from 'src/app/services/theme.service'
|
import { ThemeService } from 'src/app/services/theme.service'
|
||||||
import { SessionStore } from 'src/app/store/session.service';
|
import { SessionStore } from 'src/app/store/session.service';
|
||||||
import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
|
import { CustomTaskPipe } from 'src/app/pipes/custom-task.pipe';
|
||||||
|
import { environment } from 'src/environments/environment';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-despachos-pr',
|
selector: 'app-despachos-pr',
|
||||||
|
|||||||
@@ -369,7 +369,8 @@ export class MessageService {
|
|||||||
|
|
||||||
if(!roomObject.isGroup) {
|
if(!roomObject.isGroup) {
|
||||||
var memeberTosend = this.ChatSystemService.getRoomById(this.rid).membersExcludeMe
|
var memeberTosend = this.ChatSystemService.getRoomById(this.rid).membersExcludeMe
|
||||||
this.notificationService.ChatSendMessageNotification(memeberTosend[0].username,ChatMessage.u.username,ChatMessage.msg,this.rid)
|
console.log(ChatMessage)
|
||||||
|
this.notificationService.ChatSendMessageNotification(memeberTosend[0].username,ChatMessage.u.name,ChatMessage.msg,this.rid)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -40,44 +40,43 @@ export class NotificationsService {
|
|||||||
private platform: Platform,
|
private platform: Platform,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private zone: NgZone,
|
private zone: NgZone,
|
||||||
private eventtrigger: EventTrigger,) {}
|
private eventtrigger: EventTrigger,) {
|
||||||
|
|
||||||
|
|
||||||
registerCallback({type, funx, id = uuidv4()} : {
|
|
||||||
type: notificationObject,
|
|
||||||
funx: Function
|
|
||||||
id?: string
|
|
||||||
}) {
|
|
||||||
this.callbacks[id] = { funx, id, type}
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
deleteCallback(id) {
|
|
||||||
delete this.callbacks[id]
|
|
||||||
}
|
|
||||||
|
|
||||||
private async runNotificationCallback(notification) {
|
|
||||||
|
|
||||||
for (const [key, value] of Object.entries(this.callbacks)) {
|
|
||||||
if(value.type == notification.data.Object) {
|
|
||||||
|
|
||||||
const dontRepeat = await value.funx(notification)
|
|
||||||
|
|
||||||
if(dontRepeat) {
|
|
||||||
delete this.callbacks[key]
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if (value.type == '*') {
|
|
||||||
const dontRepeat = await value.funx(notification)
|
|
||||||
|
|
||||||
if(dontRepeat) {
|
|
||||||
delete this.callbacks[key]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
// registerCallback({type, funx, id = uuidv4()} : {
|
||||||
|
// type: notificationObject,
|
||||||
|
// funx: Function
|
||||||
|
// id?: string
|
||||||
|
// }) {
|
||||||
|
// this.callbacks[id] = { funx, id, type}
|
||||||
|
// return id;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// private async runNotificationCallback(notification) {
|
||||||
|
|
||||||
|
// for (const [key, value] of Object.entries(this.callbacks)) {
|
||||||
|
// if(value.type == notification.data.Object) {
|
||||||
|
|
||||||
|
// const dontRepeat = await value.funx(notification)
|
||||||
|
|
||||||
|
// if(dontRepeat) {
|
||||||
|
// delete this.callbacks[key]
|
||||||
|
// }
|
||||||
|
|
||||||
|
// } else if (value.type == '*') {
|
||||||
|
// const dontRepeat = await value.funx(notification)
|
||||||
|
|
||||||
|
// if(dontRepeat) {
|
||||||
|
// delete this.callbacks[key]
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
getTokenByUserIdAndId(user, userID) {
|
getTokenByUserIdAndId(user, userID) {
|
||||||
// const geturl = environment.apiURL + 'notifications/user/' + userID;
|
// const geturl = environment.apiURL + 'notifications/user/' + userID;
|
||||||
@@ -194,7 +193,7 @@ export class NotificationsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ChatSendMessageNotification(userID,title,bodymsg,roomId) {
|
ChatSendMessageNotification(userID,title,bodymsg,roomId) {
|
||||||
const geturl = environment.apiURL + `notifications/send`;
|
const geturl = environment.apiURL + `notifications/sendbyUsername`;
|
||||||
|
|
||||||
const headers = { 'Authorization': SessionStore.user.BasicAuthKey };
|
const headers = { 'Authorization': SessionStore.user.BasicAuthKey };
|
||||||
const message = {
|
const message = {
|
||||||
@@ -203,6 +202,23 @@ export class NotificationsService {
|
|||||||
}
|
}
|
||||||
let id = 437
|
let id = 437
|
||||||
console.log(userID,title,bodymsg,roomId)
|
console.log(userID,title,bodymsg,roomId)
|
||||||
|
this.http.post<Tokenn>(geturl+`?username=${userID}&title=${title}&body=${bodymsg}`, message, { headers }).subscribe(data => {
|
||||||
|
this.active = true
|
||||||
|
console.log(data)
|
||||||
|
}, (error) => {
|
||||||
|
console.log(error)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
ChatSendMessageNotificationGrup(userID,title,bodymsg,roomId) {
|
||||||
|
const geturl = environment.apiURL + `notifications/send`;
|
||||||
|
|
||||||
|
const headers = { 'Authorization': SessionStore.user.BasicAuthKey };
|
||||||
|
const message = {
|
||||||
|
"Service": "chat",
|
||||||
|
"IdObject": roomId
|
||||||
|
}
|
||||||
|
console.log(userID,title,bodymsg,roomId)
|
||||||
this.http.post<Tokenn>(geturl+`?userId=${userID}&title=${title}&body=${bodymsg}`, message, { headers }).subscribe(data => {
|
this.http.post<Tokenn>(geturl+`?userId=${userID}&title=${title}&body=${bodymsg}`, message, { headers }).subscribe(data => {
|
||||||
this.active = true
|
this.active = true
|
||||||
console.log(data)
|
console.log(data)
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ export const doneITProd: Environment = {
|
|||||||
sentryUrl: 'https://9920cc36f1d740b987426ee8d80cf588@o4504340905525248.ingest.sentry.io/4504340946419712',
|
sentryUrl: 'https://9920cc36f1d740b987426ee8d80cf588@o4504340905525248.ingest.sentry.io/4504340946419712',
|
||||||
logoLabel: 'doneIT',
|
logoLabel: 'doneIT',
|
||||||
despachoLabel: 'Titular',
|
despachoLabel: 'Titular',
|
||||||
|
despachoLabel2: 'Despachos do Titular',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const doneITDev: Environment = {
|
export const doneITDev: Environment = {
|
||||||
@@ -33,4 +34,5 @@ export const doneITDev: Environment = {
|
|||||||
sentryUrl: 'https://9920cc36f1d740b987426ee8d80cf588@o4504340905525248.ingest.sentry.io/4504340946419712',
|
sentryUrl: 'https://9920cc36f1d740b987426ee8d80cf588@o4504340905525248.ingest.sentry.io/4504340946419712',
|
||||||
logoLabel: 'doneIT',
|
logoLabel: 'doneIT',
|
||||||
despachoLabel: 'Titular',
|
despachoLabel: 'Titular',
|
||||||
|
despachoLabel2: 'Despachos do Titular',
|
||||||
};
|
};
|
||||||
@@ -9,6 +9,7 @@ export const oaprProd: Environment = {
|
|||||||
apiWsChatUrl: 'wss://gd-chat.oapr.gov.ao/websocket',
|
apiWsChatUrl: 'wss://gd-chat.oapr.gov.ao/websocket',
|
||||||
logoLabel: 'Presidente da República',
|
logoLabel: 'Presidente da República',
|
||||||
despachoLabel: 'Presidente da República',
|
despachoLabel: 'Presidente da República',
|
||||||
|
despachoLabel2: 'Despachos Presidenciais',
|
||||||
production: false,
|
production: false,
|
||||||
domain: 'oapr.gov.ao',
|
domain: 'oapr.gov.ao',
|
||||||
defaultuser: '',
|
defaultuser: '',
|
||||||
@@ -26,6 +27,7 @@ export const oaprDev: Environment = {
|
|||||||
apiWsChatUrl: 'wss://gd-chat.oapr.gov.ao/websocket',
|
apiWsChatUrl: 'wss://gd-chat.oapr.gov.ao/websocket',
|
||||||
logoLabel: 'Presidente da República',
|
logoLabel: 'Presidente da República',
|
||||||
despachoLabel: 'Presidente da República',
|
despachoLabel: 'Presidente da República',
|
||||||
|
despachoLabel2: 'Despachos Presidenciais',
|
||||||
production: false,
|
production: false,
|
||||||
domain: 'oapr.gov.ao',
|
domain: 'oapr.gov.ao',
|
||||||
defaultuser: 'gmanuel@oapr.gov.ao',
|
defaultuser: 'gmanuel@oapr.gov.ao',
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
export let versionData = {
|
export let versionData = {
|
||||||
"shortSHA": "065fc517a",
|
"shortSHA": "6ff883c98",
|
||||||
"SHA": "065fc517aedb4f1a87f84ccf0a87b4331f373f67",
|
"SHA": "6ff883c9823b89c727d25fcccf2df8c647b5c0ae",
|
||||||
"branch": "no_bug_movemente",
|
"branch": "no_bug_movemente",
|
||||||
"lastCommitAuthor": "'Peter Maquiran'",
|
"lastCommitAuthor": "'Peter Maquiran'",
|
||||||
"lastCommitTime": "'Fri Feb 3 14:37:29 2023 +0100'",
|
"lastCommitTime": "'Fri Feb 3 19:37:47 2023 +0100'",
|
||||||
"lastCommitMessage": "improve",
|
"lastCommitMessage": "message",
|
||||||
"lastCommitNumber": "4719",
|
"lastCommitNumber": "4720",
|
||||||
"change": "",
|
"change": "",
|
||||||
"changeStatus": "On branch no_bug_movemente\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: .gitignore\n\tmodified: package-lock.json\n\tmodified: package.json\n\tmodified: src/app/home/home.page.ts\n\tmodified: src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.ts\n\tmodified: src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.ts\n\tmodified: src/app/pages/gabinete-digital/gabinete-digital.page.ts\n\tmodified: src/app/services/background.service.ts\n\tmodified: src/app/services/notifications.service.ts\n\tmodified: src/app/shared/agenda/approve-event/approve-event.page.ts\n\tmodified: src/app/shared/gabinete-digital/events-to-approve/events-to-approve.page.ts\n\tmodified: src/app/store/eventoaprovacao-store.service.ts\n\tmodified: src/app/store/session.service.ts\n\tmodified: src/assets/firebase-messaging-sw.js\n\tmodified: src/environments/environment.prod.ts\n\tmodified: src/index.html",
|
"changeStatus": "On branch no_bug_movemente\nAll conflicts fixed but you are still merging.\n (use \"git commit\" to conclude merge)\n\nChanges to be committed:\n\tmodified: src/app/modals/profile/profile.page.ts\n\tmodified: src/app/models/envarioment.ts\n\tmodified: src/app/pages/agenda/agenda.page.html\n\tmodified: src/app/pages/gabinete-digital/despachos-pr/despachos-pr.page.ts\n\tmodified: src/app/services/chat/message.service.ts\n\tmodified: src/app/services/notifications.service.ts\n\tmodified: src/environments/suport/doneIt.ts\n\tmodified: src/environments/suport/oapr.ts\n\tmodified: version/git-version.ts",
|
||||||
"changeAuthor": "peter.maquiran"
|
"changeAuthor": "peter.maquiran"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user