Skip to content

Commit

Permalink
Removed console.log from code (#1596)
Browse files Browse the repository at this point in the history
* removed all console.log commands from code
  • Loading branch information
koliaBp authored Aug 29, 2022
1 parent d8a1cb9 commit bc1ce21
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 21 deletions.
1 change: 0 additions & 1 deletion src/app/shared/services/signalR/signal-r.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export class SignalRService {

this.hubConnection
.start()
.then(() => console.log('Connection started'))
.catch(err => console.error('Error while starting connection: ' + err));

this.hubConnection.on("ReceiveNotification", (notification: Notification) => {
Expand Down
3 changes: 0 additions & 3 deletions src/app/shared/store/admin.state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ export class AdminState {

@Action(OnDeleteDirectionSuccess)
onDeleteDirectionSuccess({ dispatch }: StateContext<AdminStateModel>, { payload }: OnDeleteDirectionSuccess): void {
console.log('Direction is deleted', payload);
dispatch([new ShowMessageBar({ message: 'Напрямок видалено!', type: 'success' }), new GetFilteredDirections()]);
}

Expand Down Expand Up @@ -312,7 +311,6 @@ export class AdminState {
]);
patchState({ direction: payload });
this.location.back();
console.log('Direction is created', payload);
}
@Action(UpdateDirection)
updateDirection(
Expand Down Expand Up @@ -340,7 +338,6 @@ export class AdminState {
new GetFilteredDirections(),
]);
this.location.back();
console.log('Direction is updated', payload);
}

@Action(GetDirectionById)
Expand Down
1 change: 0 additions & 1 deletion src/app/shared/store/registration.state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ export class RegistrationState {

@Action(OnAuthFail)
onAuthFail(): void {
console.log('Authorization failed');
this.snackBar.open("Упс! Перевірте з'єднання", '', {
duration: 5000,
panelClass: ['red-snackbar'],
Expand Down
15 changes: 0 additions & 15 deletions src/app/shared/store/user.state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,6 @@ export class UserState {
{ id, parameters }: GetApplicationsByProviderId
): Observable<ApplicationCards> {
patchState({ isLoading: true });
console.log(parameters);

return this.applicationService
.getApplicationsByProviderId(id, parameters)
Expand Down Expand Up @@ -467,7 +466,6 @@ export class UserState {
): void {
const message = Util.getWorkshopMessage(payload);
patchState({ isLoading: false });
console.log('Workshop is created', payload);
dispatch([
new MarkFormDirty(false),
new ShowMessageBar({ message: message.text, type: message.type }),
Expand All @@ -491,7 +489,6 @@ export class UserState {

@Action(OnDeleteWorkshopSuccess)
onDeleteWorkshopSuccess({ dispatch }: StateContext<UserStateModel>, { payload }: OnDeleteWorkshopSuccess): void {
console.log('Workshop is deleted', payload);
dispatch([
new ShowMessageBar({
message: `Дякуємо! Гурток "${payload.title}" видалено!`,
Expand All @@ -517,7 +514,6 @@ export class UserState {

@Action(OnCreateChildrenSuccess)
onCreateChildrenSuccess({ dispatch }: StateContext<UserStateModel>, { payload }: OnCreateChildrenSuccess): void {
console.log('Child is created', payload);
dispatch([
new ShowMessageBar({
message: 'Дякуємо! Дитина була успішно додана.',
Expand Down Expand Up @@ -550,7 +546,6 @@ export class UserState {
@Action(OnCreateProviderSuccess)
onCreateProviderSuccess({ dispatch }: StateContext<UserStateModel>, { payload }: OnCreateProviderSuccess): void {
dispatch(new GetProfile()).subscribe(() => this.router.navigate(['']));
console.log('Provider is created', payload);
dispatch([
new ShowMessageBar({
message: 'Організацію успішно створено',
Expand Down Expand Up @@ -672,7 +667,6 @@ export class UserState {
{ dispatch }: StateContext<UserStateModel>,
{ payload }: OnCreateAchievementSuccess
): void {
console.log('Achievement is created', payload);
dispatch([new ShowMessageBar({ message: 'Новe Досягнення додано!', type: 'success' }), new MarkFormDirty(false)]);
this.router.navigate(['/details/workshop/', payload.workshopId]);
}
Expand Down Expand Up @@ -711,7 +705,6 @@ export class UserState {
{ dispatch }: StateContext<UserStateModel>,
{ payload }: OnCreateApplicationSuccess
): void {
console.log('Application is created', payload);
dispatch([new ShowMessageBar({ message: 'Заявку створено!', type: 'success' }), new MarkFormDirty(false)]);
this.router.navigate(['']);
}
Expand Down Expand Up @@ -742,7 +735,6 @@ export class UserState {
{ dispatch }: StateContext<UserStateModel>,
{ payload }: OnDeleteAchievementSuccess
): void {
console.log('Child is deleted', payload);
dispatch([
new ShowMessageBar({ message: 'Досягнення видалено!', type: 'success' }),
new GetUsersChildren(),
Expand All @@ -758,7 +750,6 @@ export class UserState {

@Action(OnDeleteChildSuccess)
onDeleteChildSuccess({ dispatch }: StateContext<UserStateModel>, { payload }: OnDeleteChildSuccess): void {
console.log('Child is deleted', payload);
dispatch([new ShowMessageBar({ message: 'Дитину видалено!', type: 'success' }), new GetUsersChildren()]);
}

Expand Down Expand Up @@ -812,14 +803,12 @@ export class UserState {
@Action(OnUpdateWorkshopSuccess)
onUpdateWorkshopSuccess({ dispatch }: StateContext<UserStateModel>, { payload }: OnUpdateWorkshopSuccess): void {
const message = Util.getWorkshopMessage(payload);
console.log('Workshop is updated', payload);
dispatch([new MarkFormDirty(false), new ShowMessageBar({ message: message.text, type: message.type })]);
this.router.navigate(['/personal-cabinet/provider/workshops']);
}

@Action(OnUpdateChildSuccess)
onUpdateChildSuccess({ dispatch }: StateContext<UserStateModel>, { payload }: OnUpdateChildSuccess): void {
console.log('Child is updated', payload);
dispatch([
new MarkFormDirty(false),
new ShowMessageBar({
Expand Down Expand Up @@ -851,7 +840,6 @@ export class UserState {
@Action(OnUpdateProviderSuccess)
onUpdateProviderSuccess({ dispatch }: StateContext<UserStateModel>, { payload }: OnUpdateProviderSuccess): void {
dispatch(new MarkFormDirty(false));
console.log('Provider is updated', payload);
dispatch([
new ShowMessageBar({
message: 'Організація успішно відредагована',
Expand Down Expand Up @@ -947,7 +935,6 @@ export class UserState {

@Action(OnCreateRatingSuccess)
onCreateRatingSuccess({ dispatch }: StateContext<UserStateModel>, { payload }: OnCreateRatingSuccess): void {
console.log('Rate is created', payload);
dispatch(
new ShowMessageBar({
message: 'Оцінка успішно поставлена!',
Expand Down Expand Up @@ -1040,7 +1027,6 @@ export class UserState {
new MarkFormDirty(false),
new ShowMessageBar({ message: 'Користувач успішно заблокований', type: 'success' }),
]);
console.log('parent is blocked', payload);
}

@Action(UnBlockParent)
Expand Down Expand Up @@ -1071,7 +1057,6 @@ export class UserState {
new MarkFormDirty(false),
new ShowMessageBar({ message: 'Користувач успішно розблокований', type: 'success' }),
]);
console.log('parent is unBlocked', payload);
}

@Action(GetBlockedParents)
Expand Down
1 change: 0 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { AppModule } from './app/app.module';
import { environment } from './environments/environment';

if (environment.production) {
window.console.log = () => {};
enableProdMode();
}

Expand Down

0 comments on commit bc1ce21

Please sign in to comment.