mirror of
https://framagit.org/framasoft/framadate/funky-framadate-front.git
synced 2023-08-25 13:53:14 +02:00
rename utils services
This commit is contained in:
parent
fdcb7327f0
commit
b9181b5b3f
@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core';
|
|||||||
import { ConfigService } from '../../services/config.service';
|
import { ConfigService } from '../../services/config.service';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { HttpClient } from '@angular/common/http';
|
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';
|
import { environment } from '../../../../src/environments/environment';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -16,7 +16,7 @@ export class AdminComponent implements OnInit {
|
|||||||
constructor(
|
constructor(
|
||||||
public config: ConfigService,
|
public config: ConfigService,
|
||||||
public router: Router,
|
public router: Router,
|
||||||
private utils: PollUtilities,
|
private utils: PollUtilitiesService,
|
||||||
public http: HttpClient,
|
public http: HttpClient,
|
||||||
public activeRoute: ActivatedRoute
|
public activeRoute: ActivatedRoute
|
||||||
) {}
|
) {}
|
||||||
|
@ -2,7 +2,7 @@ import { DOCUMENT } from '@angular/common';
|
|||||||
import { ChangeDetectorRef, Component, Inject, OnInit } from '@angular/core';
|
import { ChangeDetectorRef, Component, Inject, OnInit } from '@angular/core';
|
||||||
|
|
||||||
import { ToastService } from '../../../../src/app/core/services/toast.service';
|
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 { otherDefaultDates } from '../../config/defaultConfigs';
|
||||||
import { ConfigService } from '../../services/config.service';
|
import { ConfigService } from '../../services/config.service';
|
||||||
import { BaseComponent } from '../example/base-page/base.component';
|
import { BaseComponent } from '../example/base-page/base.component';
|
||||||
@ -23,7 +23,7 @@ export class DatesComponent extends BaseComponent implements OnInit {
|
|||||||
public config: ConfigService,
|
public config: ConfigService,
|
||||||
private cd: ChangeDetectorRef,
|
private cd: ChangeDetectorRef,
|
||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
private dateUtilities: DateUtilities,
|
private dateUtilities: DateUtilitiesService,
|
||||||
@Inject(DOCUMENT) private document: any
|
@Inject(DOCUMENT) private document: any
|
||||||
) {
|
) {
|
||||||
super(config);
|
super(config);
|
||||||
|
@ -2,7 +2,7 @@ import { Location } from '@angular/common';
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
import { environment } from '../../../../src/environments/environment';
|
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 { ConfigService } from '../../services/config.service';
|
||||||
import { BaseComponent } from '../example/base-page/base.component';
|
import { BaseComponent } from '../example/base-page/base.component';
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ export class VisibilityComponent extends BaseComponent implements OnInit {
|
|||||||
public showCustomPassword = false;
|
public showCustomPassword = false;
|
||||||
public baseUrl = environment.api.baseHref;
|
public baseUrl = environment.api.baseHref;
|
||||||
|
|
||||||
constructor(public config: ConfigService, public utils: PollUtilities) {
|
constructor(public config: ConfigService, public utils: PollUtilitiesService) {
|
||||||
super(config);
|
super(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import { ConfirmationService } from 'primeng/api';
|
|||||||
import { environment } from '../../../src/environments/environment';
|
import { environment } from '../../../src/environments/environment';
|
||||||
import { ToastService } from '../../../src/app/core/services/toast.service';
|
import { ToastService } from '../../../src/app/core/services/toast.service';
|
||||||
import { PollConfig } from '../config/PollConfig';
|
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 { mockPoll3 } from '../mocks/mock-poll3';
|
||||||
import { mockSuccessVote } from '../mocks/mock-success-vote';
|
import { mockSuccessVote } from '../mocks/mock-success-vote';
|
||||||
import { mockMyPolls } from '../mocks/mockmypolls';
|
import { mockMyPolls } from '../mocks/mockmypolls';
|
||||||
@ -25,7 +25,7 @@ export class ConfigService extends PollConfig {
|
|||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private utils: PollUtilities,
|
private utils: PollUtilitiesService,
|
||||||
private confirmationService: ConfirmationService
|
private confirmationService: ConfirmationService
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
|
@ -3,7 +3,7 @@ import { Injectable } from '@angular/core';
|
|||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class DateUtilities {
|
export class DateUtilitiesService {
|
||||||
/**
|
/**
|
||||||
* add some days to a date, to compute intervals
|
* add some days to a date, to compute intervals
|
||||||
* @param days
|
* @param days
|
@ -5,7 +5,7 @@ import { Poll } from '../models/poll.model';
|
|||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class PollUtilities {
|
export class PollUtilitiesService {
|
||||||
// utils functions
|
// utils functions
|
||||||
/**
|
/**
|
||||||
* generate unique id to have a default url for future poll
|
* generate unique id to have a default url for future poll
|
@ -3,7 +3,7 @@ import { FormArray, FormBuilder, FormGroup, Validators } from '@angular/forms';
|
|||||||
import { UuidService } from '../../../../core/services/uuid.service';
|
import { UuidService } from '../../../../core/services/uuid.service';
|
||||||
import { ToastService } from '../../../../core/services/toast.service';
|
import { ToastService } from '../../../../core/services/toast.service';
|
||||||
import { PollService } from '../../../../core/services/poll.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 { ApiService } from '../../../../core/services/api.service';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { DOCUMENT } from '@angular/common';
|
import { DOCUMENT } from '@angular/common';
|
||||||
@ -43,7 +43,7 @@ export class DateSelectComponent implements OnInit {
|
|||||||
private uuidService: UuidService,
|
private uuidService: UuidService,
|
||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
private pollService: PollService,
|
private pollService: PollService,
|
||||||
public dateUtilities: DateUtilities,
|
public dateUtilities: DateUtilitiesService,
|
||||||
private apiService: ApiService,
|
private apiService: ApiService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private translateService: TranslateService,
|
private translateService: TranslateService,
|
||||||
|
@ -5,7 +5,7 @@ import { Poll } from '../../core/models/poll.model';
|
|||||||
import { ModalService } from '../../core/services/modal.service';
|
import { ModalService } from '../../core/services/modal.service';
|
||||||
import { PollService } from '../../core/services/poll.service';
|
import { PollService } from '../../core/services/poll.service';
|
||||||
import { DateService } from '../../core/services/date.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 { Comment } from '../../core/models/comment.model';
|
||||||
import { StorageService } from '../../core/services/storage.service';
|
import { StorageService } from '../../core/services/storage.service';
|
||||||
import { ApiService } from '../../core/services/api.service';
|
import { ApiService } from '../../core/services/api.service';
|
||||||
@ -34,7 +34,7 @@ export class ConsultationComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private utils: PollUtilities,
|
private utils: PollUtilitiesService,
|
||||||
private _Activatedroute: ActivatedRoute,
|
private _Activatedroute: ActivatedRoute,
|
||||||
public storageService: StorageService,
|
public storageService: StorageService,
|
||||||
public api: ApiService,
|
public api: ApiService,
|
||||||
|
Loading…
Reference in New Issue
Block a user