fix errors

This commit is contained in:
Peter Maquiran
2024-12-06 11:21:32 +01:00
parent 5a1bbe6103
commit aef73625f0
10 changed files with 112 additions and 69 deletions
@@ -0,0 +1,21 @@
import { Injectable } from '@angular/core';
import { RemoteNotificationService } from 'src/app/module/notification/data/datasource/remote-notification.service';
import { z } from 'zod';
const NotificationDeleteAllByUserIdSchema = z.any()
export type INotificationDeleteAllByUserId = z.infer<typeof NotificationDeleteAllByUserIdSchema>
@Injectable({
providedIn: 'root'
})
export class NotificationDeleteAllServiceUseCase {
constructor(
private RemoteNotificationService:RemoteNotificationService
) { }
async execute(userId: INotificationDeleteAllByUserId) {
return this.RemoteNotificationService.notificationDeleteAll(userId)
}
}
@@ -26,4 +26,9 @@ export class RemoteNotificationService {
return await this.httpService.patch<NotificationOutputDTO>(`${this.baseUrl}/Notifications/${id}/status`);
}
async notificationDeleteAll(userId: any) {
return await this.httpService.delete<NotificationOutputDTO>(`${this.baseUrl}/Notifications/${userId}`);
}
}
@@ -1,16 +0,0 @@
import { TestBed } from '@angular/core/testing';
import { NotificationRepositoryService } from './notification-repository.service';
describe('NotificationRepositoryService', () => {
let service: NotificationRepositoryService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(NotificationRepositoryService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});
@@ -0,0 +1,19 @@
import { Injectable } from '@angular/core';
import { INotificationDeleteAllByUserId, NotificationDeleteAllServiceUseCase } from 'src/app/core/notification/use-case/notification-delete-all-use-case.service'
@Injectable({
providedIn: 'root'
})
export class NotificationService {
constructor(
private NotificationDeleteAllServiceUseCase: NotificationDeleteAllServiceUseCase
) { }
deleteAllNotificationByUserId(userId: INotificationDeleteAllByUserId) {
this.NotificationDeleteAllServiceUseCase.execute(userId)
}
}
@@ -0,0 +1,15 @@
import { NgModule } from '@angular/core';
import { HttpModule } from 'src/app/infra/http/http.module';
@NgModule({
imports: [HttpModule],
providers: [],
declarations: [],
schemas: [],
entryComponents: []
})
export class NotificationModule {
constructor() {}
}
@@ -155,8 +155,6 @@
<!-- This is the list view -->
<div *ngSwitchCase="'listview'">
{{ TaskService.loadCount}}: TaskService.loadCount
<ion-item-sliding *ngIf="TaskService.loadCount || (AllProcess.length >= 1 && TaskService.loadNum >= 1)">
<div class="listview">
<ion-list *ngIf="AllProcess">
+1
View File
@@ -446,6 +446,7 @@ export class ChatPage implements OnInit {
doRefresh(event) {
setTimeout(() => {
try {
this.ChatServiceService.getRoomList()
event?.target?.complete();
} catch (error) { }
}, 1000);
+45 -45
View File
@@ -1,51 +1,51 @@
import { versionData } from '../../../version/git-version'
import { Environment } from './../../app/models/envarioment'
export const environment: Environment = {
id:'3',
apiURL: 'http://gpr-dev-01:83/jwt/api/',
/* apiURL: 'https://gdapi-dev-0.dyndns.info/jwt/api/', */
apiChatUrl: 'https://gdchat-dev.dyndns.info/api/v1/',
apiWsChatUrl: 'wss://gdchat-dev.dyndns.info/websocket',
apiPCURL: 'http://gpr-dev-01:86/api/',
/* apiPCURL: 'https://gdcmapi-dev.dyndns.info/api/', */
logoLabel: 'Presidente da República',
despachoLabel: 'Presidenciais',
despachoLabel2: 'Despachos Presidênciais',
production: false,
domain: 'gabinetedigital.local',
defaultuser: 'paulo.pinto@gabinetedigital.local',
defaultuserpwd: 'tabteste@006',
chatOffline: true,
presidential: true,
version: versionData,
agendaPR: 'Agenda do PR',
agendaVP: 'Agenda do MD',
PR: 'PR',
VP: '',
dispatchPR: 'Despachos Presidênciais',
sentryUrl: 'https://9920cc36f1d740b987426ee8d80cf588@o4504340905525248.ingest.sentry.io/4504340946419712',
storageProduction: true,
rejectUnauthorized: "true",
fileHub: 'https://gdcmapi-dev.dyndns.info/FileHub'
/* production: true,
domain: 'gabinetedigital.local',
defaultuser: '',
defaultuserpwd: '',
chatOffline: true,
presidential: false,
version: versionData,
sentryUrl: 'https://9920cc36f1d740b987426ee8d80cf588@o4504340905525248.ingest.sentry.io/4504340946419712',
logoLabel: 'doneIT',
despachoLabel: 'do Titular',
despachoLabel2: 'Despachos do Titular',
agendaPR: 'Agenda do Titular',
agendaVP: 'Agenda do (MD)',
PR: 'Titular',
VP: '',
dispatchPR: 'Despachos Titular',
storageProduction: true */
};
// export const environment: Environment = {
// id:'3',
// apiURL: 'http://gpr-dev-01:83/jwt/api/',
// /* apiURL: 'https://gdapi-dev-0.dyndns.info/jwt/api/', */
// apiChatUrl: 'https://gdchat-dev.dyndns.info/api/v1/',
// apiWsChatUrl: 'wss://gdchat-dev.dyndns.info/websocket',
// apiPCURL: 'http://gpr-dev-01:86/api/',
// /* apiPCURL: 'https://gdcmapi-dev.dyndns.info/api/', */
// logoLabel: 'Presidente da República',
// despachoLabel: 'Presidenciais',
// despachoLabel2: 'Despachos Presidênciais',
// production: false,
// domain: 'gabinetedigital.local',
// defaultuser: 'paulo.pinto@gabinetedigital.local',
// defaultuserpwd: 'tabteste@006',
// chatOffline: true,
// presidential: true,
// version: versionData,
// agendaPR: 'Agenda do PR',
// agendaVP: 'Agenda do MD',
// PR: 'PR',
// VP: '',
// dispatchPR: 'Despachos Presidênciais',
// sentryUrl: 'https://9920cc36f1d740b987426ee8d80cf588@o4504340905525248.ingest.sentry.io/4504340946419712',
// storageProduction: true,
// rejectUnauthorized: "true",
// fileHub: 'https://gdcmapi-dev.dyndns.info/FileHub'
// /* production: true,
// domain: 'gabinetedigital.local',
// defaultuser: '',
// defaultuserpwd: '',
// chatOffline: true,
// presidential: false,
// version: versionData,
// sentryUrl: 'https://9920cc36f1d740b987426ee8d80cf588@o4504340905525248.ingest.sentry.io/4504340946419712',
// logoLabel: 'doneIT',
// despachoLabel: 'do Titular',
// despachoLabel2: 'Despachos do Titular',
// agendaPR: 'Agenda do Titular',
// agendaVP: 'Agenda do (MD)',
// PR: 'Titular',
// VP: '',
// dispatchPR: 'Despachos Titular',
// storageProduction: true */
// };
export const DevDev: Environment = {
+6 -6
View File
@@ -1,11 +1,11 @@
export let versionData = {
"shortSHA": "dad392335",
"SHA": "dad392335e0043ef66332a82dd2e524e714443c2",
"shortSHA": "5a1bbe610",
"SHA": "5a1bbe6103c983534e6a66d69a7344a8520d67f5",
"branch": "feature/login-v2",
"lastCommitAuthor": "'Peter Maquiran'",
"lastCommitTime": "'Thu Nov 7 11:15:01 2024 +0100'",
"lastCommitMessage": "add logout v2",
"lastCommitNumber": "6133",
"changeStatus": "On branch feature/login-v2\nYour branch is up to date with 'origin/feature/login-v2'.\n\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tdeleted: src/app/Rules/user.service.spec.ts\n\tdeleted: src/app/Rules/user.service.ts\n\tmodified: src/app/app.module.ts\n\tmodified: src/app/core/chat/repository/room/room-remote-repository.ts\n\tmodified: src/app/core/chat/usecase/room/room-get-list-use-case.service.ts\n\tnew file: src/app/core/chat/usecase/room/room-search-by-name.service.ts\n\tmodified: src/app/core/user/repository/user-remote-repository.ts\n\tmodified: src/app/core/user/use-case/user-login-use-case.service.ts\n\tnew file: src/app/core/user/use-case/user-refresh-token.service.ts\n\tmodified: src/app/guards/auth.guard.ts\n\tmodified: src/app/infra/database/dexie/instance/chat/service.ts\n\tdeleted: src/app/interceptors/chatToken.interceptor.ts\n\tmodified: src/app/interceptors/token.interceptors.ts\n\tmodified: src/app/modals/create-process/create-process.page.ts\n\tmodified: src/app/modals/profile/profile.module.ts\n\tmodified: src/app/models/despacho.model.ts\n\tmodified: src/app/module/chat/data/repository/room/room-remote-repository.service.ts\n\tmodified: src/app/module/user/data/datasource/user-remote-repository.service.ts\n\tmodified: src/app/module/user/domain/user.service.ts\n\tmodified: src/app/module/user/user.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/gabinete-digital.page.html\n\tmodified: src/app/pages/gabinete-digital/gabinete-digital.page.ts\n\tmodified: src/app/pages/login/login.module.ts\n\tmodified: src/app/pages/login/login.page.ts\n\tmodified: src/app/services/auth.service.ts\n\tmodified: src/app/services/processes.service.ts\n\tmodified: src/app/services/task.service.ts\n\tmodified: src/app/shared/API/middleware/middleware-service.service.ts\n\tmodified: src/app/store/session.service.ts\n\tmodified: src/app/ui/chat/chat.page.html\n\tmodified: src/app/ui/chat/chat.page.ts\n\tmodified: src/app/ui/chat/component/messages/messages.page.html\n\tdeleted: src/app/ui/login/inactivity/inactivity-routing.module.ts\n\tdeleted: src/app/ui/login/inactivity/inactivity.module.ts\n\tdeleted: src/app/ui/login/inactivity/inactivity.page.html\n\tdeleted: src/app/ui/login/inactivity/inactivity.page.scss\n\tdeleted: src/app/ui/login/inactivity/inactivity.page.spec.ts\n\tdeleted: src/app/ui/login/inactivity/inactivity.page.ts\n\tdeleted: src/app/ui/login/login/login-routing.module.ts\n\tdeleted: src/app/ui/login/login/login.module.ts\n\tdeleted: src/app/ui/login/login/login.page.html\n\tdeleted: src/app/ui/login/login/login.page.scss\n\tdeleted: src/app/ui/login/login/login.page.spec.ts\n\tdeleted: src/app/ui/login/login/login.page.ts",
"lastCommitTime": "'Thu Dec 5 19:14:11 2024 +0100'",
"lastCommitMessage": "fix issues",
"lastCommitNumber": "6134",
"changeStatus": "On branch feature/login-v2\nYour branch is ahead of 'origin/feature/login-v2' by 1 commit.\n (use \"git push\" to publish your local commits)\n\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tnew file: src/app/core/notification/repository/notification-remote-repository.ts\n\tnew file: src/app/core/notification/use-case/notification-delete-all-use-case.service.ts\n\tmodified: src/app/module/notification/data/datasource/remote-notification.service.ts\n\tdeleted: src/app/module/notification/data/notification-repository.service.spec.ts\n\tnew file: src/app/module/notification/domain/notification.service.ts\n\tnew file: src/app/module/notification/notification.module.ts\n\tmodified: src/app/pages/gabinete-digital/gabinete-digital.page.html\n\tmodified: src/app/ui/chat/chat.page.ts\n\tmodified: src/environments/suport/dev.ts\n\tmodified: version/git-version.ts",
"changeAuthor": "peter.maquiran"
}