Skip to content

Commit dcca5f3

Browse files
committed
Merge branch 'master' into TT-466-Clock-Out
2 parents eeb43b3 + 5f659ee commit dcca5f3

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "time-tracker",
3-
"version": "1.56.0",
3+
"version": "1.57.1",
44
"scripts": {
55
"preinstall": "npx npm-force-resolutions",
66
"ng": "ng",

src/app/modules/users/components/users-list/users-list.component.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@
2323
(change)="switchGroup('time-tracker-admin', user); updateRole(ROLES.admin, user, $event);"
2424
[checked]="user.groups.includes('time-tracker-admin')"></ui-switch>
2525
admin
26-
<ui-switch
26+
<span *ngIf="!isDevelopment">
27+
<ui-switch
2728
size="small"
2829
(change)="switchGroup('time-tracker-tester', user)"
2930
[checked]="user.groups.includes('time-tracker-tester')"></ui-switch>
30-
test
31+
test
32+
</span>
3133
</td>
3234
</tr>
3335
</tbody>

src/app/modules/users/components/users-list/users-list.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ActionsSubject, select, Store, Action } from '@ngrx/store';
44
import { DataTableDirective } from 'angular-datatables';
55
import { Observable, Subject, Subscription } from 'rxjs';
66
import { delay, filter } from 'rxjs/operators';
7-
import { ROLES } from 'src/environments/environment';
7+
import { ROLES, environment } from 'src/environments/environment';
88
import { User } from '../../models/users';
99
import { LoadUsers, UserActionTypes, AddUserToGroup, RemoveUserFromGroup } from '../../store/user.actions';
1010
import { getIsLoading } from '../../store/user.selectors';
@@ -24,6 +24,7 @@ export class UsersListComponent implements OnInit, OnDestroy, AfterViewInit {
2424
dtElement: DataTableDirective;
2525
dtOptions: any = {};
2626
switchGroupsSubscription: Subscription;
27+
isDevelopment = true;
2728

2829
public get ROLES() {
2930
return ROLES;
@@ -34,6 +35,7 @@ export class UsersListComponent implements OnInit, OnDestroy, AfterViewInit {
3435
}
3536

3637
ngOnInit(): void {
38+
this.isDevelopment = !environment.production;
3739
this.store.dispatch(new LoadUsers());
3840
this.loadUsersSubscription = this.actionsSubject$
3941
.pipe(filter((action: any) => action.type === UserActionTypes.LOAD_USERS_SUCCESS))

0 commit comments

Comments
 (0)