rename utils services

This commit is contained in:
Tykayn 2021-04-29 10:45:22 +02:00 committed by tykayn
parent fdcb7327f0
commit b9181b5b3f
8 changed files with 14 additions and 14 deletions

View File

@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { ConfigService } from '../../services/config.service';
import { ActivatedRoute, Router } from '@angular/router';
import { HttpClient } from '@angular/common/http';
import { PollUtilities } from '../../../../src/app/core/services/PollUtilities';
import { PollUtilitiesService } from '../../../../src/app/core/services/poll.utilities.service';
import { environment } from '../../../../src/environments/environment';
@Component({
@ -16,7 +16,7 @@ export class AdminComponent implements OnInit {
constructor(
public config: ConfigService,
public router: Router,
private utils: PollUtilities,
private utils: PollUtilitiesService,
public http: HttpClient,
public activeRoute: ActivatedRoute
) {}

View File

@ -2,7 +2,7 @@ import { DOCUMENT } from '@angular/common';
import { ChangeDetectorRef, Component, Inject, OnInit } from '@angular/core';
import { ToastService } from '../../../../src/app/core/services/toast.service';
import { DateUtilities } from '../../../../src/app/core/services/DateUtilities';
import { DateUtilitiesService } from '../../../../src/app/core/services/date.utilities.service';
import { otherDefaultDates } from '../../config/defaultConfigs';
import { ConfigService } from '../../services/config.service';
import { BaseComponent } from '../example/base-page/base.component';
@ -23,7 +23,7 @@ export class DatesComponent extends BaseComponent implements OnInit {
public config: ConfigService,
private cd: ChangeDetectorRef,
private toastService: ToastService,
private dateUtilities: DateUtilities,
private dateUtilities: DateUtilitiesService,
@Inject(DOCUMENT) private document: any
) {
super(config);

View File

@ -2,7 +2,7 @@ import { Location } from '@angular/common';
import { Component, OnInit } from '@angular/core';
import { environment } from '../../../../src/environments/environment';
import { PollUtilities } from '../../../../src/app/core/services/PollUtilities';
import { PollUtilitiesService } from '../../../../src/app/core/services/poll.utilities.service';
import { ConfigService } from '../../services/config.service';
import { BaseComponent } from '../example/base-page/base.component';
@ -16,7 +16,7 @@ export class VisibilityComponent extends BaseComponent implements OnInit {
public showCustomPassword = false;
public baseUrl = environment.api.baseHref;
constructor(public config: ConfigService, public utils: PollUtilities) {
constructor(public config: ConfigService, public utils: PollUtilitiesService) {
super(config);
}

View File

@ -6,7 +6,7 @@ import { ConfirmationService } from 'primeng/api';
import { environment } from '../../../src/environments/environment';
import { ToastService } from '../../../src/app/core/services/toast.service';
import { PollConfig } from '../config/PollConfig';
import { PollUtilities } from '../../../src/app/core/services/PollUtilities';
import { PollUtilitiesService } from '../../../src/app/core/services/poll.utilities.service';
import { mockPoll3 } from '../mocks/mock-poll3';
import { mockSuccessVote } from '../mocks/mock-success-vote';
import { mockMyPolls } from '../mocks/mockmypolls';
@ -25,7 +25,7 @@ export class ConfigService extends PollConfig {
private http: HttpClient,
private toastService: ToastService,
private router: Router,
private utils: PollUtilities,
private utils: PollUtilitiesService,
private confirmationService: ConfirmationService
) {
super();

View File

@ -3,7 +3,7 @@ import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root',
})
export class DateUtilities {
export class DateUtilitiesService {
/**
* add some days to a date, to compute intervals
* @param days

View File

@ -5,7 +5,7 @@ import { Poll } from '../models/poll.model';
@Injectable({
providedIn: 'root',
})
export class PollUtilities {
export class PollUtilitiesService {
// utils functions
/**
* generate unique id to have a default url for future poll

View File

@ -3,7 +3,7 @@ import { FormArray, FormBuilder, FormGroup, Validators } from '@angular/forms';
import { UuidService } from '../../../../core/services/uuid.service';
import { ToastService } from '../../../../core/services/toast.service';
import { PollService } from '../../../../core/services/poll.service';
import { DateUtilities } from '../../../../core/services/DateUtilities';
import { DateUtilitiesService } from '../../../../core/services/date.utilities.service';
import { ApiService } from '../../../../core/services/api.service';
import { Router } from '@angular/router';
import { DOCUMENT } from '@angular/common';
@ -43,7 +43,7 @@ export class DateSelectComponent implements OnInit {
private uuidService: UuidService,
private toastService: ToastService,
private pollService: PollService,
public dateUtilities: DateUtilities,
public dateUtilities: DateUtilitiesService,
private apiService: ApiService,
private router: Router,
private translateService: TranslateService,

View File

@ -5,7 +5,7 @@ import { Poll } from '../../core/models/poll.model';
import { ModalService } from '../../core/services/modal.service';
import { PollService } from '../../core/services/poll.service';
import { DateService } from '../../core/services/date.service';
import { PollUtilities } from '../../core/services/PollUtilities';
import { PollUtilitiesService } from '../../core/services/poll.utilities.service';
import { Comment } from '../../core/models/comment.model';
import { StorageService } from '../../core/services/storage.service';
import { ApiService } from '../../core/services/api.service';
@ -34,7 +34,7 @@ export class ConsultationComponent implements OnInit, OnDestroy {
constructor(
private router: Router,
private utils: PollUtilities,
private utils: PollUtilitiesService,
private _Activatedroute: ActivatedRoute,
public storageService: StorageService,
public api: ApiService,