Skip to content

Commit 16ccb5a

Browse files
Juan IsazaJuan Isaza
authored andcommitted
Se ajusta la variable isDevelopmentOrProd
1 parent 8d9e744 commit 16ccb5a

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/app/modules/customer-management/components/projects/components/services/project.service.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { Project } from '../../../../../shared/models';
1111
export class ProjectService {
1212
projects: Project[] = [];
1313
url = `${environment.timeTrackerApiUrl}/projects`;
14-
isDevelopment = environment.production === EnvironmentType.TT_DEV;
14+
isDevelopmentOrProd = environment.production === EnvironmentType.TT_DEV || environment.production === EnvironmentType.TT_PROD;
1515

1616
constructor(private http: HttpClient) {}
1717

@@ -34,7 +34,7 @@ export class ProjectService {
3434

3535
updateProject(projectData): Observable<any> {
3636
const { id } = projectData;
37-
if (this.isDevelopment) {
37+
if (this.isDevelopmentOrProd) {
3838
if (projectData.status === 'active') {
3939
projectData.status = 1;
4040
}
@@ -43,7 +43,7 @@ export class ProjectService {
4343
}
4444

4545
deleteProject(projectId: string): Observable<any> {
46-
return this.isDevelopment
46+
return this.isDevelopmentOrProd
4747
? this.http.put(`${this.url}/${projectId}`, { status: 0 })
4848
: this.http.delete(`${this.url}/${projectId}`);
4949
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
<td class="col-3 text-center">
2121
<ui-switch
2222
size="small"
23-
(change)="!isDevelopment?switchGroup('time-tracker-admin', user):null; updateRole(ROLES.admin, user, $event);"
23+
(change)="!isDevelopmentOrProd?switchGroup('time-tracker-admin', user):null; updateRole(ROLES.admin, user, $event);"
2424
[checked]="user.groups.includes('time-tracker-admin')"></ui-switch>
2525
admin
26-
<span *ngIf="!isDevelopment">
26+
<span *ngIf="!isDevelopmentOrProd">
2727
<ui-switch
2828
size="small"
2929
(change)="switchGroup('time-tracker-tester', user)"

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class UsersListComponent implements OnInit, OnDestroy, AfterViewInit {
2727
columnDefs: [{ orderable: false, targets: [2]}]
2828
};
2929
switchGroupsSubscription: Subscription;
30-
isDevelopment = true;
30+
isDevelopmentOrProd = true;
3131

3232
public get ROLES() {
3333
return ROLES;
@@ -38,7 +38,7 @@ export class UsersListComponent implements OnInit, OnDestroy, AfterViewInit {
3838
}
3939

4040
ngOnInit(): void {
41-
this.isDevelopment = environment.production === EnvironmentType.TT_DEV || environment.production === EnvironmentType.TT_PROD_LEGACY;
41+
this.isDevelopmentOrProd = environment.production === EnvironmentType.TT_DEV || environment.production === EnvironmentType.TT_PROD;
4242
this.store.dispatch(new LoadUsers());
4343
this.loadUsersSubscription = this.actionsSubject$
4444
.pipe(filter((action: any) => action.type === UserActionTypes.LOAD_USERS_SUCCESS))

0 commit comments

Comments
 (0)