diff --git a/README.md b/README.md index 90583346d..130e95574 100644 --- a/README.md +++ b/README.md @@ -153,6 +153,12 @@ MIFOS_SUPPORTED_LANGUAGES=cs-CS,de-DE,en-US,es-MX,fr-FR,it-IT,ko-KO,lt-LT,lv-LV, ``` These are the Language available now: +``` +MIFOS_SESSION_IDLE_TIMEOUT=300000 +``` +Time in milliseconds for Session idle timeout, default 300000 seconds + + | Language | Code | File | |:----------:|:----:|:----------:| | Czech | cs | cs-CS.json | diff --git a/docker-compose.yml b/docker-compose.yml index b965abd11..ff76bbb4d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -22,3 +22,4 @@ services: - FINERACT_PLATFORM_TENANT_IDENTIFIER=default - MIFOS_DEFAULT_LANGUAGE=en-US - MIFOS_SUPPORTED_LANGUAGES=cs-CS,de-DE,en-US,es-MX,fr-FR,it-IT,ko-KO,lt-LT,lv-LV,ne-NE,pt-PT,sw-SW + - MIFOS_SESSION_IDLE_TIMEOUT=300000 diff --git a/src/app/core/authentication/authentication.service.ts b/src/app/core/authentication/authentication.service.ts index d4ab19cbc..7eba09373 100644 --- a/src/app/core/authentication/authentication.service.ts +++ b/src/app/core/authentication/authentication.service.ts @@ -25,6 +25,8 @@ import { OAuth2Token } from './o-auth2-token.model'; */ @Injectable() export class AuthenticationService { + // User logged in boolean + private userLoggedIn: boolean; /** Denotes whether the user credentials should persist through sessions. */ private rememberMe: boolean; @@ -57,6 +59,7 @@ export class AuthenticationService { constructor(private http: HttpClient, private alertService: AlertService, private authenticationInterceptor: AuthenticationInterceptor) { + this.userLoggedIn = false; this.rememberMe = false; this.storage = sessionStorage; const savedCredentials = JSON.parse( @@ -169,6 +172,7 @@ export class AuthenticationService { * @param {Credentials} credentials Authenticated user credentials. */ private onLoginSuccess(credentials: Credentials) { + this.userLoggedIn = true; if (environment.oauth.enabled) { this.authenticationInterceptor.setAuthorizationToken(credentials.accessToken); } else { @@ -202,6 +206,7 @@ export class AuthenticationService { this.authenticationInterceptor.removeAuthorization(); this.setCredentials(); this.resetDialog(); + this.userLoggedIn = false; return of(true); } @@ -344,4 +349,11 @@ export class AuthenticationService { ); } + /* + * Get user logged in + */ + getUserLoggedIn(): boolean { + return this.userLoggedIn; + } + } diff --git a/src/app/home/home.module.ts b/src/app/home/home.module.ts index 2546fcd05..a839a7616 100644 --- a/src/app/home/home.module.ts +++ b/src/app/home/home.module.ts @@ -15,6 +15,7 @@ import { AmountDisbursedPieComponent } from './dashboard/amount-disbursed-pie/am import { ClientTrendsBarComponent } from './dashboard/client-trends-bar/client-trends-bar.component'; import { TranslateModule } from '@ngx-translate/core'; import { WarningDialogComponent } from './warning-dialog/warning-dialog.component'; +import { SessionTimeoutDialogComponent } from './timeout-dialog/session-timeout-dialog.component'; /** * Home Component @@ -35,7 +36,8 @@ import { WarningDialogComponent } from './warning-dialog/warning-dialog.componen AmountCollectedPieComponent, AmountDisbursedPieComponent, ClientTrendsBarComponent, - WarningDialogComponent + WarningDialogComponent, + SessionTimeoutDialogComponent ], providers: [ ] }) diff --git a/src/app/home/timeout-dialog/idle-timeout.service.spec.ts b/src/app/home/timeout-dialog/idle-timeout.service.spec.ts new file mode 100644 index 000000000..27af83890 --- /dev/null +++ b/src/app/home/timeout-dialog/idle-timeout.service.spec.ts @@ -0,0 +1,16 @@ +import { TestBed } from '@angular/core/testing'; + +import { IdleTimeoutService } from './idle-timeout.service'; + +describe('IdleTimeoutService', () => { + let service: IdleTimeoutService; + + beforeEach(() => { + TestBed.configureTestingModule({}); + service = TestBed.inject(IdleTimeoutService); + }); + + it('should be created', () => { + expect(service).toBeTruthy(); + }); +}); diff --git a/src/app/home/timeout-dialog/idle-timeout.service.ts b/src/app/home/timeout-dialog/idle-timeout.service.ts new file mode 100644 index 000000000..9cc1fdbf4 --- /dev/null +++ b/src/app/home/timeout-dialog/idle-timeout.service.ts @@ -0,0 +1,29 @@ +import { Injectable } from '@angular/core'; +import { environment } from 'environments/environment'; +import { interval, merge, fromEvent, Observable} from 'rxjs'; +import { takeUntil, repeat, map} from 'rxjs/operators'; + +/** + * Idle timeout service used to track idle user + */ +@Injectable({ + providedIn: 'root' +}) +export class IdleTimeoutService { + + // max timeout for an idle user + readonly timeoutDelay = environment.session.timeout.idleTimeout || 300000; // 5 minutes + + // observable timeout + readonly $onSessionTimeout: Observable; + + constructor() { + const events = ['mousemove', 'keydown', 'wheel', 'mousedown', 'scroll']; + const $signal = merge(...events.map(eventName => fromEvent(document, eventName))); + this.$onSessionTimeout = interval(this.timeoutDelay).pipe( + takeUntil($signal), + map(() => undefined), + repeat() + ); + } +} diff --git a/src/app/home/timeout-dialog/session-timeout-dialog.component.html b/src/app/home/timeout-dialog/session-timeout-dialog.component.html new file mode 100644 index 000000000..b46beb3d4 --- /dev/null +++ b/src/app/home/timeout-dialog/session-timeout-dialog.component.html @@ -0,0 +1,5 @@ +

{{ 'labels.heading.Session Timeout' | translate }}

+{{ 'labels.text.Session timed out after a period of inactivity' | translate }}. + + + \ No newline at end of file diff --git a/src/app/home/timeout-dialog/session-timeout-dialog.component.scss b/src/app/home/timeout-dialog/session-timeout-dialog.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/home/timeout-dialog/session-timeout-dialog.component.spec.ts b/src/app/home/timeout-dialog/session-timeout-dialog.component.spec.ts new file mode 100644 index 000000000..ac2c419c0 --- /dev/null +++ b/src/app/home/timeout-dialog/session-timeout-dialog.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { SessionTimeoutDialogComponent } from './session-timeout-dialog.component'; + +describe('SessionTimeoutDialogComponent', () => { + let component: SessionTimeoutDialogComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ SessionTimeoutDialogComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(SessionTimeoutDialogComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/home/timeout-dialog/session-timeout-dialog.component.ts b/src/app/home/timeout-dialog/session-timeout-dialog.component.ts new file mode 100644 index 000000000..cd54dc539 --- /dev/null +++ b/src/app/home/timeout-dialog/session-timeout-dialog.component.ts @@ -0,0 +1,17 @@ +import { Component, OnInit } from '@angular/core'; +import { MatDialogRef } from '@angular/material/dialog'; + +@Component({ + selector: 'mifosx-session-timeout-dialog', + templateUrl: './session-timeout-dialog.component.html', + styleUrls: ['./session-timeout-dialog.component.scss'] +}) +export class SessionTimeoutDialogComponent implements OnInit { + + constructor(public dialogRef: MatDialogRef) { + } + + ngOnInit(): void { + } + +} diff --git a/src/app/home/warning-dialog/warning-dialog.component.html b/src/app/home/warning-dialog/warning-dialog.component.html index 7603e2343..6573c19d4 100644 --- a/src/app/home/warning-dialog/warning-dialog.component.html +++ b/src/app/home/warning-dialog/warning-dialog.component.html @@ -1,5 +1,5 @@ -

{{ "labels.text."+title | translate }}

+

{{ "labels.text." + title | translate }}

{{ "labels.text.Warning message" | translate }} - + \ No newline at end of file diff --git a/src/app/web-app.component.ts b/src/app/web-app.component.ts index b7d24075e..7862cd814 100644 --- a/src/app/web-app.component.ts +++ b/src/app/web-app.component.ts @@ -3,6 +3,7 @@ import { Component, OnInit, HostListener, HostBinding } from '@angular/core'; import { Router, NavigationEnd, ActivatedRoute } from '@angular/router'; import { Title } from '@angular/platform-browser'; import { MatSnackBar } from '@angular/material/snack-bar'; +import { MatDialog } from '@angular/material/dialog'; /** rxjs Imports */ import { merge } from 'rxjs'; @@ -20,6 +21,8 @@ import { ThemeStorageService } from './shared/theme-picker/theme-storage.service import { AlertService } from './core/alert/alert.service'; import { AuthenticationService } from './core/authentication/authentication.service'; import { SettingsService } from './settings/settings.service'; +import { IdleTimeoutService } from './home/timeout-dialog/idle-timeout.service'; +import { SessionTimeoutDialogComponent } from './home/timeout-dialog/session-timeout-dialog.component'; /** Custom Items */ import { Alert } from './core/alert/alert.model'; @@ -95,6 +98,8 @@ export class WebAppComponent implements OnInit { * @param {SettingsService} settingsService Settings Service. * @param {AuthenticationService} authenticationService Authentication service. * @param {Dates} dateUtils Dates service. + * @param {IdleTimeoutService} idle Idle timeout service. + * @param {MatDialog} dialog Dialog component. */ constructor(private router: Router, private activatedRoute: ActivatedRoute, @@ -106,7 +111,9 @@ export class WebAppComponent implements OnInit { private settingsService: SettingsService, private authenticationService: AuthenticationService, private themingService: ThemingService, - private dateUtils: Dates) { } + private dateUtils: Dates, + private idle: IdleTimeoutService, + private dialog: MatDialog) { } @HostBinding('class') public cssClass: string; @@ -210,6 +217,17 @@ export class WebAppComponent implements OnInit { this.settingsService.setTenantIdentifier(environment.fineractPlatformTenantId || 'default'); } this.settingsService.setTenantIdentifiers(environment.fineractPlatformTenantIds.split(',')); + + // Subscribe to session timeout If IdleTimeout is higher than 0 (zero) + if (environment.session.timeout.idleTimeout > 0) { + this.idle.$onSessionTimeout.subscribe(() => { + if (this.authenticationService.getUserLoggedIn()) { + this.alertService.alert({type: 'Session timeout', message: this.translateService.instant('labels.text.Session timed out')}); + this.dialog.open(SessionTimeoutDialogComponent); + this.logout(); + } + }); + } } logout() { diff --git a/src/assets/env.js b/src/assets/env.js index 7baae31e1..f5f6ea8ac 100644 --- a/src/assets/env.js +++ b/src/assets/env.js @@ -28,4 +28,8 @@ // Time in seconds for COB Catch-Up, default 30 seconds window['env']['waitTimeForCOBCatchUp'] = ''; + + // Time in milliseconds for Session idle timeout, default 300000 seconds + window['env']['sessionIdleTimeout'] = '60000'; + })(this); diff --git a/src/assets/env.template.js b/src/assets/env.template.js index fff90af8a..c028ef4e5 100644 --- a/src/assets/env.template.js +++ b/src/assets/env.template.js @@ -28,4 +28,8 @@ // Time in seconds for COB Catch-Up, default 30 seconds window['env']['waitTimeForCOBCatchUp'] = '$MIFOS_WAIT_TIME_FOR_CATCHUP'; + + // Time in milliseconds for Session idle timeout, default 300000 seconds + window['env']['sessionIdleTimeout'] = '$MIFOS_SESSION_IDLE_TIMEOUT'; + })(this); diff --git a/src/assets/translations/cs-CS.json b/src/assets/translations/cs-CS.json index 9442676bc..48240de73 100644 --- a/src/assets/translations/cs-CS.json +++ b/src/assets/translations/cs-CS.json @@ -843,6 +843,7 @@ "Select Excel File": "Vyberte Soubor Excel", "Selected Clients": "Vybraní klienti", "Selected Groups": "Vybrané skupiny", + "Session Timeout": "Časový limit relace", "Settings": "Nastavení", "Share Accounts": "Sdílet účty", "Share Products": "Sdílejte produkty", @@ -2719,6 +2720,8 @@ "Self Service App Configuration": "Konfigurace samoobslužné aplikace", "Self Service Task Management": "Samoobslužná správa úloh", "Self Service Users": "Samoobslužní uživatelé", + "Session timed out": "Časový limit relace vypršel", + "Session timed out after a period of inactivity": "Časový limit relace vypršel po určité době nečinnosti", "Set or update office-level opening balances for GL accounts": "Nastavte nebo aktualizujte počáteční zůstatky na úrovni kanceláře pro účty HK", "Settings": "Nastavení", "Settle Cash": "Vyrovnat hotovost", diff --git a/src/assets/translations/de-DE.json b/src/assets/translations/de-DE.json index 2f91b62d0..b31803262 100644 --- a/src/assets/translations/de-DE.json +++ b/src/assets/translations/de-DE.json @@ -844,6 +844,7 @@ "Select Excel File": "Wählen Sie Excel-Datei", "Selected Clients": "Ausgewählte Kunden", "Selected Groups": "Ausgewählte Gruppen", + "Session Timeout": "Session-Timeout", "Settings": "Einstellungen", "Share Accounts": "Konten teilen", "Share Products": "Produkte teilen", @@ -2718,6 +2719,8 @@ "Self Service App Configuration": "Self-Service-App-Konfiguration", "Self Service Task Management": "Self-Service-Aufgabenverwaltung", "Self Service Users": "Self-Service-Benutzer", + "Session timed out": "Sitzung abgelaufen", + "Session timed out after a period of inactivity": "Die Sitzung ist nach einem Zeitraum der Inaktivität abgelaufen", "Set or update office-level opening balances for GL accounts": "Legen Sie Eröffnungssalden auf Büroebene für Hauptbuchkonten fest oder aktualisieren Sie sie", "Settings": "Einstellungen", "Settle Cash": "Bargeld begleichen", diff --git a/src/assets/translations/en-US.json b/src/assets/translations/en-US.json index 8fe67c0ea..d9f9e9af5 100644 --- a/src/assets/translations/en-US.json +++ b/src/assets/translations/en-US.json @@ -843,6 +843,7 @@ "Select Excel File": "Select Excel File", "Selected Clients": "Selected Clients", "Selected Groups": "Selected Groups", + "Session Timeout": "Session Timeout", "Settings": "Settings", "Share Accounts": "Share Accounts", "Share Products": "Share Products", @@ -2719,6 +2720,8 @@ "Self Service App Configuration": "Self Service App Configuration", "Self Service Task Management": "Self Service Task Management", "Self Service Users": "Self Service Users", + "Session timed out": "Session timed out", + "Session timed out after a period of inactivity": "Session timed out after a period of inactivity", "Set or update office-level opening balances for GL accounts": "Set or update office-level opening balances for GL accounts", "Settings": "Settings", "Settle Cash": "Settle Cash", diff --git a/src/assets/translations/es-MX.json b/src/assets/translations/es-MX.json index d42e98e37..0ab4d1c64 100644 --- a/src/assets/translations/es-MX.json +++ b/src/assets/translations/es-MX.json @@ -844,6 +844,7 @@ "Select Excel File": "Seleccionar archivo de Excel", "Selected Clients": "Clientes seleccionados", "Selected Groups": "Grupos seleccionados", + "Session Timeout": "Término de la Sesión", "Settings": "Ajustes", "Share Accounts": "Compartir cuentas", "Share Products": "Compartir productos", @@ -2719,6 +2720,8 @@ "Self Service App Configuration": "Configuración de la aplicación de autoservicio", "Self Service Task Management": "Gestión de tareas de autoservicio", "Self Service Users": "Usuarios de autoservicio", + "Session timed out": "Sesión agotada", + "Session timed out after a period of inactivity": "La sesión se agotara después de un período de inactividad", "Set or update office-level opening balances for GL accounts": "Establecer o actualizar saldos de apertura a nivel de oficina para cuentas del libro mayor", "Settings": "Ajustes", "Settle Cash": "Liquidar efectivo", diff --git a/src/assets/translations/fr-FR.json b/src/assets/translations/fr-FR.json index 6c0b10e83..c91c1c53c 100644 --- a/src/assets/translations/fr-FR.json +++ b/src/assets/translations/fr-FR.json @@ -844,6 +844,7 @@ "Select Excel File": "Sélectionnez un fichier Excel", "Selected Clients": "Clients sélectionnés", "Selected Groups": "Groupes sélectionnés", + "Session Timeout": "Expiration de la session", "Settings": "Paramètres", "Share Accounts": "Partager des comptes", "Share Products": "Partager des produits", @@ -2719,6 +2720,8 @@ "Self Service App Configuration": "Configuration de l'application libre-service", "Self Service Task Management": "Gestion des tâches en libre-service", "Self Service Users": "Utilisateurs libre-service", + "Session timed out": "Session expirée", + "Session timed out after a period of inactivity": "Session expirée après une période d'inactivité", "Set or update office-level opening balances for GL accounts": "Définir ou mettre à jour les soldes d'ouverture au niveau du bureau pour les comptes GL", "Settings": "Paramètres", "Settle Cash": "Règlement en espèces", diff --git a/src/assets/translations/it-IT.json b/src/assets/translations/it-IT.json index bf4da0e12..1a158ea47 100644 --- a/src/assets/translations/it-IT.json +++ b/src/assets/translations/it-IT.json @@ -844,6 +844,7 @@ "Select Excel File": "Seleziona File Excel", "Selected Clients": "Clienti selezionati", "Selected Groups": "Gruppi selezionati", + "Session Timeout": "Timeout della sessione", "Settings": "Impostazioni", "Share Accounts": "Condividi account", "Share Products": "Condividi prodotti", @@ -2719,6 +2720,8 @@ "Self Service App Configuration": "Configurazione dell'app self-service", "Self Service Task Management": "Gestione delle attività self-service", "Self Service Users": "Utenti self-service", + "Session timed out": "Sessione scaduta", + "Session timed out after a period of inactivity": "Sessione scaduta dopo un periodo di inattività", "Set or update office-level opening balances for GL accounts": "Imposta o aggiorna i saldi di apertura a livello di ufficio per i conti GL", "Settings": "Impostazioni", "Settle Cash": "Saldare in contanti", diff --git a/src/assets/translations/ko-KO.json b/src/assets/translations/ko-KO.json index 059681b4b..33c461c27 100644 --- a/src/assets/translations/ko-KO.json +++ b/src/assets/translations/ko-KO.json @@ -845,6 +845,7 @@ "Select Excel File": "엑셀 파일 선택", "Selected Clients": "선택된 클라이언트", "Selected Groups": "선택된 그룹", + "Session Timeout": "세션 타임 아웃", "Settings": "설정", "Share Accounts": "계정 공유", "Share Products": "제품 공유", @@ -2719,6 +2720,8 @@ "Self Service App Configuration": "셀프 서비스 앱 구성", "Self Service Task Management": "셀프 서비스 작업 관리", "Self Service Users": "셀프 서비스 사용자", + "Session timed out": "세션 시간이 초과되었습니다", + "Session timed out after a period of inactivity": "일정 기간 동안 활동이 없으면 세션 시간이 초과되었습니다.", "Set or update office-level opening balances for GL accounts": "GL 계정에 대한 사무실 수준 기초 잔액 설정 또는 업데이트", "Settings": "설정", "Settle Cash": "현금 정산", diff --git a/src/assets/translations/lt-LT.json b/src/assets/translations/lt-LT.json index 4cd849cff..a2b7d03c4 100644 --- a/src/assets/translations/lt-LT.json +++ b/src/assets/translations/lt-LT.json @@ -844,6 +844,7 @@ "Select Excel File": "Pasirinkite Excel failą", "Selected Clients": "Atrinkti klientai", "Selected Groups": "Pasirinktos grupės", + "Session Timeout": "Seanso skirtasis laikas", "Settings": "Nustatymai", "Share Accounts": "Bendrinti paskyras", "Share Products": "Dalintis produktais", @@ -2719,6 +2720,8 @@ "Self Service App Configuration": "Savitarnos programos konfigūracija", "Self Service Task Management": "Savitarnos užduočių valdymas", "Self Service Users": "Savitarnos vartotojai", + "Session timed out": "Sesijos laikas baigėsi", + "Session timed out after a period of inactivity": "Po tam tikro neveiklumo laikotarpio baigėsi seanso laikas", "Set or update office-level opening balances for GL accounts": "Nustatykite arba atnaujinkite biuro lygio pradinius GL sąskaitų likučius", "Settings": "Nustatymai", "Settle Cash": "Atsiskaityti grynaisiais", diff --git a/src/assets/translations/lv-LV.json b/src/assets/translations/lv-LV.json index 9d0de114f..85decd3ed 100644 --- a/src/assets/translations/lv-LV.json +++ b/src/assets/translations/lv-LV.json @@ -844,6 +844,7 @@ "Select Excel File": "Atlasiet Excel failu", "Selected Clients": "Izvēlētie klienti", "Selected Groups": "Atlasītās grupas", + "Session Timeout": "Sesijas noildze", "Settings": "Iestatījumi", "Share Accounts": "Kopīgot kontus", "Share Products": "Kopīgojiet produktus", @@ -2719,6 +2720,8 @@ "Self Service App Configuration": "Pašapkalpošanās lietotņu konfigurācija", "Self Service Task Management": "Pašapkalpošanās uzdevumu pārvaldība", "Self Service Users": "Pašapkalpošanās lietotāji", + "Session timed out": "Sesija beigusies", + "Session timed out after a period of inactivity": "Sesija beidzās pēc dīkstāves perioda", "Set or update office-level opening balances for GL accounts": "Iestatiet vai atjauniniet biroja līmeņa sākuma atlikumus GL kontiem", "Settings": "Iestatījumi", "Settle Cash": "Norēķini skaidrā naudā", diff --git a/src/assets/translations/ne-NE.json b/src/assets/translations/ne-NE.json index 5ed0b4286..9daabb26b 100644 --- a/src/assets/translations/ne-NE.json +++ b/src/assets/translations/ne-NE.json @@ -844,6 +844,7 @@ "Select Excel File": "एक्सेल फाइल चयन गर्नुहोस्", "Selected Clients": "चयन गरिएका ग्राहकहरू", "Selected Groups": "चयन गरिएका समूहहरू", + "Session Timeout": "सत्र टाइमआउट", "Settings": "सेटिङहरू", "Share Accounts": "खाताहरू साझेदारी गर्नुहोस्", "Share Products": "उत्पादनहरू साझेदारी गर्नुहोस्", @@ -2719,6 +2720,8 @@ "Self Service App Configuration": "सेल्फ सर्विस एप कन्फिगरेसन", "Self Service Task Management": "स्वयं सेवा कार्य व्यवस्थापन", "Self Service Users": "स्वयं सेवा प्रयोगकर्ताहरू", + "Session timed out": "सत्रको समय सकियो", + "Session timed out after a period of inactivity": "निष्क्रियताको अवधि पछि सत्रको समय सकियो", "Set or update office-level opening balances for GL accounts": "GL खाताहरूका लागि अफिस-स्तर खोल्ने ब्यालेन्सहरू सेट वा अद्यावधिक गर्नुहोस्", "Settings": "सेटिङहरू", "Settle Cash": "नगद मिलाउनुहोस्", diff --git a/src/assets/translations/pt-PT.json b/src/assets/translations/pt-PT.json index 72708bbe1..3c8fac98c 100644 --- a/src/assets/translations/pt-PT.json +++ b/src/assets/translations/pt-PT.json @@ -844,6 +844,7 @@ "Select Excel File": "Selecione o arquivo Excel", "Selected Clients": "Clientes Selecionados", "Selected Groups": "Grupos Selecionados", + "Session Timeout": "Sessão expirada", "Settings": "Configurações", "Share Accounts": "Compartilhar contas", "Share Products": "Compartilhe produtos", @@ -2719,6 +2720,8 @@ "Self Service App Configuration": "Configuração de aplicativo de autoatendimento", "Self Service Task Management": "Gerenciamento de tarefas de autoatendimento", "Self Service Users": "Usuários de autoatendimento", + "Session timed out": "A sessão expirou", + "Session timed out after a period of inactivity": "A sessão expirou após um período de inatividade", "Set or update office-level opening balances for GL accounts": "Definir ou atualizar saldos iniciais em nível de escritório para contas contábeis", "Settings": "Configurações", "Settle Cash": "Liquidar dinheiro", diff --git a/src/assets/translations/sw-SW.json b/src/assets/translations/sw-SW.json index ca517b27f..0291da22a 100644 --- a/src/assets/translations/sw-SW.json +++ b/src/assets/translations/sw-SW.json @@ -844,6 +844,7 @@ "Select Excel File": "Chagua Faili ya Excel", "Selected Clients": "Wateja Waliochaguliwa", "Selected Groups": "Vikundi Vilivyochaguliwa", + "Session Timeout": "Muda wa Kikao umekwisha", "Settings": "Mipangilio", "Share Accounts": "Shiriki Akaunti", "Share Products": "Shiriki Bidhaa", @@ -2719,6 +2720,8 @@ "Self Service App Configuration": "Usanidi wa Programu ya Kujihudumia", "Self Service Task Management": "Usimamizi wa Kazi ya Kujihudumia", "Self Service Users": "Watumiaji wa Kujihudumia", + "Session timed out": "Muda wa kipindi umekwisha", + "Session timed out after a period of inactivity": "Muda wa kipindi umekwisha baada ya muda wa kutofanya kazi", "Set or update office-level opening balances for GL accounts": "Weka au usasishe masalio ya kufungua ngazi ya ofisi kwa akaunti za GL", "Settings": "Mipangilio", "Settle Cash": "Maliza Pesa", diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index 2989f77d3..9d5e98a00 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -36,7 +36,12 @@ export const environment = { // Time in seconds, default 60 seconds waitTimeForNotifications: window['env']['waitTimeForNotifications'] || 60, // Time in seconds, default 30 seconds - waitTimeForCOBCatchUp: window['env']['waitTimeForCOBCatchUp'] || 30 + waitTimeForCOBCatchUp: window['env']['waitTimeForCOBCatchUp'] || 30, + session: { + timeout: { + idleTimeout: window['env']['sessionIdleTimeout'] || 300000, // 5 minutes + } + } }; // Server URL diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 2bef3aeb2..647ac24c2 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -41,7 +41,12 @@ export const environment = { // Time in seconds, default 60 seconds waitTimeForNotifications: window['env']['waitTimeForNotifications'] || 60, // Time in seconds, default 30 seconds - waitTimeForCOBCatchUp: window['env']['waitTimeForCOBCatchUp'] || 30 + waitTimeForCOBCatchUp: window['env']['waitTimeForCOBCatchUp'] || 30, + session: { + timeout: { + idleTimeout: window['env']['sessionIdleTimeout'] || 300000, // 5 minutes + } + } }; // Server URL