From d5bc5777b787060dfaa84c1ed7599bff272b5507 Mon Sep 17 00:00:00 2001 From: Tykayn Date: Thu, 29 Apr 2021 10:17:13 +0200 Subject: [PATCH 01/18] add good hash in route --- src/app/core/components/footer/footer.component.html | 2 +- src/app/core/services/api.service.ts | 11 ++++++++--- src/app/core/services/poll.service.ts | 6 +++++- .../consultation/consultation-routing.module.ts | 8 +++++--- .../features/consultation/consultation.component.html | 6 +++--- .../features/consultation/consultation.component.ts | 3 ++- src/app/routes-framadate.ts | 4 ++-- src/environments/environment.ts | 8 ++++---- 8 files changed, 30 insertions(+), 18 deletions(-) diff --git a/src/app/core/components/footer/footer.component.html b/src/app/core/components/footer/footer.component.html index 9410a3e2..a62e391f 100644 --- a/src/app/core/components/footer/footer.component.html +++ b/src/app/core/components/footer/footer.component.html @@ -45,7 +45,7 @@ dessin-anime - diff --git a/src/app/features/consultation/consultation.component.ts b/src/app/features/consultation/consultation.component.ts index c6aa4e66..ff7fefdd 100644 --- a/src/app/features/consultation/consultation.component.ts +++ b/src/app/features/consultation/consultation.component.ts @@ -9,6 +9,7 @@ import { PollUtilities } from '../old-stuff/config/PollUtilities'; import { Comment } from '../../core/models/comment.model'; import { StorageService } from '../../core/services/storage.service'; import { ApiService } from '../../core/services/api.service'; +import { Stack } from '../../core/models/stack.model'; @Component({ selector: 'app-consultation', @@ -74,7 +75,7 @@ export class ConsultationComponent implements OnInit, OnDestroy { } } - updateVote() { + updateVote(votestack: Stack) { alert('TODO'); } diff --git a/src/app/routes-framadate.ts b/src/app/routes-framadate.ts index 05c20a5f..3b18424f 100644 --- a/src/app/routes-framadate.ts +++ b/src/app/routes-framadate.ts @@ -25,7 +25,7 @@ export const routes: Routes = [ path: 'poll/:slug/administration', loadChildren: () => import('./features/administration/administration.module').then((m) => m.AdministrationModule), - resolve: { poll: PollService }, + // resolve: { poll: PollService }, }, { path: 'poll/:slug/consultation', @@ -35,7 +35,7 @@ export const routes: Routes = [ { path: 'poll/:slug/participation', loadChildren: () => import('./features/participation/participation.module').then((m) => m.ParticipationModule), - resolve: { poll: PollService }, + // resolve: { poll: PollService }, }, { path: 'oldstuff', diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 229e5d01..b0fcef5a 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -4,12 +4,12 @@ const backendApiUrlsInDev = { local: '/api/v1', - // remote: 'http://localhost:8000/api/v1', - remote: 'https://framadate-api.cipherbliss.com/api/v1', + remote: 'http://localhost:8000/api/v1', + // remote: 'https://framadate-api.cipherbliss.com/api/v1', }; const apiV1 = { - // baseHref: 'http://localhost:8000/api/v1', - baseHref: 'https://framadate-api.cipherbliss.com/api/v1', + baseHref: 'http://localhost:8000/api/v1', + // baseHref: 'https://framadate-api.cipherbliss.com/api/v1', api_new_poll: '/poll/', api_get_poll: '/poll/{id}', api_new_vote_stack: '/poll/{id}/answer', From fdcb7327f0b65a4ce8c7ae6f8a5bec9f5592c026 Mon Sep 17 00:00:00 2001 From: Tykayn Date: Thu, 29 Apr 2021 10:41:47 +0200 Subject: [PATCH 02/18] move old stuff --- .../old-stuff/config/PollConfig.ts | 2 +- .../old-stuff/config/defaultConfigs.ts | 0 .../date-value-accessor.metadata.json | 0 .../date-value-accessor.ts | 0 .../date-value-accessor/index.metadata.json | 0 .../custom-lib/date-value-accessor/index.ts | 0 .../date-value-accessor/module.metadata.json | 0 .../custom-lib/date-value-accessor/module.ts | 0 .../old-stuff/mocks/choice.ts | 0 .../mocks/comment-same-text-error.json | 0 .../mocks/comment-too-fast-error.json | 0 .../mocks/config-poll-dessins-animes.json | 0 .../old-stuff/mocks/created-comment.json | 0 .../old-stuff/mocks/mock-comments.ts | 0 .../old-stuff/mocks/mock-graph.ts | 0 .../old-stuff/mocks/mock-poll3.ts | 0 .../old-stuff/mocks/mock-success-vote.ts | 0 .../old-stuff/mocks/mockmypolls.ts | 0 .../old-stuff/mocks/votestack-success.json | 0 .../old-stuff/old-stuff-routing.module.ts | 0 .../old-stuff/old-stuff.module.ts | 2 +- .../pages/admin/admin.component.html | 0 .../pages/admin/admin.component.scss | 0 .../pages/admin/admin.component.spec.ts | 0 .../old-stuff/pages/admin/admin.component.ts | 4 +-- .../pages/answers/answers.component.html | 0 .../pages/answers/answers.component.scss | 0 .../pages/answers/answers.component.spec.ts | 0 .../pages/answers/answers.component.ts | 0 .../create-or-retrieve.component.html | 0 .../create-or-retrieve.component.scss | 0 .../create-or-retrieve.component.spec.ts | 0 .../create-or-retrieve.component.ts | 0 .../pages/dates/dates.component.html | 0 .../pages/dates/dates.component.scss | 0 .../pages/dates/dates.component.spec.ts | 0 .../old-stuff/pages/dates/dates.component.ts | 4 +-- .../end-confirmation.component.html | 0 .../end-confirmation.component.scss | 0 .../end-confirmation.component.spec.ts | 0 .../end-confirmation.component.ts | 2 +- .../example/base-page/base.component.html | 0 .../example/base-page/base.component.scss | 0 .../example/base-page/base.component.spec.ts | 0 .../pages/example/base-page/base.component.ts | 0 .../pages/example/kind/kind.component.html | 2 +- .../pages/example/kind/kind.component.scss | 0 .../pages/example/kind/kind.component.spec.ts | 0 .../pages/example/kind/kind.component.ts | 0 .../example/pictures/pictures.component.html | 0 .../example/pictures/pictures.component.scss | 0 .../pictures/pictures.component.spec.ts | 0 .../example/pictures/pictures.component.ts | 0 .../old-stuff/pages/home/home.component.html | 0 .../old-stuff/pages/home/home.component.scss | 0 .../pages/home/home.component.spec.ts | 0 .../old-stuff/pages/home/home.component.ts | 0 .../pages/password/password.component.html | 0 .../pages/password/password.component.scss | 0 .../pages/password/password.component.spec.ts | 0 .../pages/password/password.component.ts | 0 .../poll-display/poll-display.component.html | 0 .../poll-display/poll-display.component.scss | 1 + .../poll-display.component.spec.ts | 0 .../poll-display/poll-display.component.ts | 2 +- .../poll-graphic/poll-graphic.component.html | 0 .../poll-graphic/poll-graphic.component.scss | 0 .../poll-graphic.component.spec.ts | 0 .../poll-graphic/poll-graphic.component.ts | 0 .../pages/resume/resume.component.html | 0 .../pages/resume/resume.component.scss | 0 .../pages/resume/resume.component.spec.ts | 0 .../pages/resume/resume.component.ts | 0 .../visibility/visibility.component.html | 0 .../visibility/visibility.component.scss | 0 .../visibility/visibility.component.spec.ts | 0 .../pages/visibility/visibility.component.ts | 4 +-- .../choices-list/choices-list.component.html | 0 .../choices-list/choices-list.component.scss | 0 .../choices-list.component.spec.ts | 0 .../choices-list/choices-list.component.ts | 0 .../comments-list.component.html | 0 .../comments-list.component.scss | 0 .../comments-list.component.spec.ts | 0 .../comments-list/comments-list.component.ts | 0 .../voting-choice.component.html | 0 .../voting-choice.component.scss | 2 +- .../voting-choice.component.spec.ts | 0 .../voting-choice/voting-choice.component.ts | 0 .../voting-comment.component.html | 0 .../voting-comment.component.scss | 0 .../voting-comment.component.spec.ts | 0 .../voting-comment.component.ts | 0 .../voting-graph/voting-graph.component.html | 0 .../voting-graph/voting-graph.component.scss | 0 .../voting-graph.component.spec.ts | 0 .../voting-graph/voting-graph.component.ts | 0 .../voting-navigation.component.html | 0 .../voting-navigation.component.scss | 0 .../voting-navigation.component.spec.ts | 0 .../voting-navigation.component.ts | 0 .../voting-summary.component.html | 0 .../voting-summary.component.scss | 2 +- .../voting-summary.component.spec.ts | 0 .../voting-summary.component.ts | 0 .../pages/voting/voting.component.html | 0 .../pages/voting/voting.component.scss | 0 .../pages/voting/voting.component.spec.ts | 0 .../pages/voting/voting.component.ts | 0 .../old-stuff/services/config.service.ts | 6 ++-- .../services/progression.service.spec.ts | 0 .../ui/copy-text/copy-text.component.html | 0 .../ui/copy-text/copy-text.component.scss | 0 .../ui/copy-text/copy-text.component.spec.ts | 0 .../ui/copy-text/copy-text.component.ts | 2 +- .../resettable-input.directive.spec.ts | 0 .../directives/resettable-input.directive.ts | 0 .../erasable-input.component.html | 0 .../erasable-input.component.scss | 0 .../erasable-input.component.spec.ts | 0 .../erasable-input.component.ts | 0 .../ui/two-links/two-links.component.html | 0 .../ui/two-links/two-links.component.scss | 0 .../ui/two-links/two-links.component.spec.ts | 0 .../ui/two-links/two-links.component.ts | 0 .../components/footer/footer.component.html | 29 ------------------- .../components/header/header.component.html | 28 ++++++++++++++++++ .../config => core/services}/DateUtilities.ts | 0 .../config => core/services}/PollUtilities.ts | 3 +- .../form/date-select/date-select.component.ts | 9 ++++-- .../consultation-routing.module.ts | 2 +- .../consultation/consultation.component.ts | 2 +- .../poll-display/poll-display.component.scss | 1 - src/app/routes-framadate.ts | 4 --- 134 files changed, 56 insertions(+), 57 deletions(-) rename {src/app/features => mocks}/old-stuff/config/PollConfig.ts (97%) rename {src/app/features => mocks}/old-stuff/config/defaultConfigs.ts (100%) rename {src/app/features => mocks}/old-stuff/custom-lib/date-value-accessor/date-value-accessor.metadata.json (100%) rename {src/app/features => mocks}/old-stuff/custom-lib/date-value-accessor/date-value-accessor.ts (100%) rename {src/app/features => mocks}/old-stuff/custom-lib/date-value-accessor/index.metadata.json (100%) rename {src/app/features => mocks}/old-stuff/custom-lib/date-value-accessor/index.ts (100%) rename {src/app/features => mocks}/old-stuff/custom-lib/date-value-accessor/module.metadata.json (100%) rename {src/app/features => mocks}/old-stuff/custom-lib/date-value-accessor/module.ts (100%) rename {src/app/features => mocks}/old-stuff/mocks/choice.ts (100%) rename {src/app/features => mocks}/old-stuff/mocks/comment-same-text-error.json (100%) rename {src/app/features => mocks}/old-stuff/mocks/comment-too-fast-error.json (100%) rename {src/app/features => mocks}/old-stuff/mocks/config-poll-dessins-animes.json (100%) rename {src/app/features => mocks}/old-stuff/mocks/created-comment.json (100%) rename {src/app/features => mocks}/old-stuff/mocks/mock-comments.ts (100%) rename {src/app/features => mocks}/old-stuff/mocks/mock-graph.ts (100%) rename {src/app/features => mocks}/old-stuff/mocks/mock-poll3.ts (100%) rename {src/app/features => mocks}/old-stuff/mocks/mock-success-vote.ts (100%) rename {src/app/features => mocks}/old-stuff/mocks/mockmypolls.ts (100%) rename {src/app/features => mocks}/old-stuff/mocks/votestack-success.json (100%) rename {src/app/features => mocks}/old-stuff/old-stuff-routing.module.ts (100%) rename {src/app/features => mocks}/old-stuff/old-stuff.module.ts (98%) rename {src/app/features => mocks}/old-stuff/pages/admin/admin.component.html (100%) rename {src/app/features => mocks}/old-stuff/pages/admin/admin.component.scss (100%) rename {src/app/features => mocks}/old-stuff/pages/admin/admin.component.spec.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/admin/admin.component.ts (91%) rename {src/app/features => mocks}/old-stuff/pages/answers/answers.component.html (100%) rename {src/app/features => mocks}/old-stuff/pages/answers/answers.component.scss (100%) rename {src/app/features => mocks}/old-stuff/pages/answers/answers.component.spec.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/answers/answers.component.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/create-or-retrieve/create-or-retrieve.component.html (100%) rename {src/app/features => mocks}/old-stuff/pages/create-or-retrieve/create-or-retrieve.component.scss (100%) rename {src/app/features => mocks}/old-stuff/pages/create-or-retrieve/create-or-retrieve.component.spec.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/create-or-retrieve/create-or-retrieve.component.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/dates/dates.component.html (100%) rename {src/app/features => mocks}/old-stuff/pages/dates/dates.component.scss (100%) rename {src/app/features => mocks}/old-stuff/pages/dates/dates.component.spec.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/dates/dates.component.ts (95%) rename {src/app/features => mocks}/old-stuff/pages/end-confirmation/end-confirmation.component.html (100%) rename {src/app/features => mocks}/old-stuff/pages/end-confirmation/end-confirmation.component.scss (100%) rename {src/app/features => mocks}/old-stuff/pages/end-confirmation/end-confirmation.component.spec.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/end-confirmation/end-confirmation.component.ts (90%) rename {src/app/features => mocks}/old-stuff/pages/example/base-page/base.component.html (100%) rename {src/app/features => mocks}/old-stuff/pages/example/base-page/base.component.scss (100%) rename {src/app/features => mocks}/old-stuff/pages/example/base-page/base.component.spec.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/example/base-page/base.component.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/example/kind/kind.component.html (98%) rename {src/app/features => mocks}/old-stuff/pages/example/kind/kind.component.scss (100%) rename {src/app/features => mocks}/old-stuff/pages/example/kind/kind.component.spec.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/example/kind/kind.component.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/example/pictures/pictures.component.html (100%) rename {src/app/features => mocks}/old-stuff/pages/example/pictures/pictures.component.scss (100%) rename {src/app/features => mocks}/old-stuff/pages/example/pictures/pictures.component.spec.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/example/pictures/pictures.component.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/home/home.component.html (100%) rename {src/app/features => mocks}/old-stuff/pages/home/home.component.scss (100%) rename {src/app/features => mocks}/old-stuff/pages/home/home.component.spec.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/home/home.component.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/password/password.component.html (100%) rename {src/app/features => mocks}/old-stuff/pages/password/password.component.scss (100%) rename {src/app/features => mocks}/old-stuff/pages/password/password.component.spec.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/password/password.component.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/poll/poll-display/poll-display.component.html (100%) create mode 100644 mocks/old-stuff/pages/poll/poll-display/poll-display.component.scss rename {src/app/features => mocks}/old-stuff/pages/poll/poll-display/poll-display.component.spec.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/poll/poll-display/poll-display.component.ts (96%) rename {src/app/features => mocks}/old-stuff/pages/poll/poll-graphic/poll-graphic.component.html (100%) rename {src/app/features => mocks}/old-stuff/pages/poll/poll-graphic/poll-graphic.component.scss (100%) rename {src/app/features => mocks}/old-stuff/pages/poll/poll-graphic/poll-graphic.component.spec.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/poll/poll-graphic/poll-graphic.component.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/resume/resume.component.html (100%) rename {src/app/features => mocks}/old-stuff/pages/resume/resume.component.scss (100%) rename {src/app/features => mocks}/old-stuff/pages/resume/resume.component.spec.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/resume/resume.component.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/visibility/visibility.component.html (100%) rename {src/app/features => mocks}/old-stuff/pages/visibility/visibility.component.scss (100%) rename {src/app/features => mocks}/old-stuff/pages/visibility/visibility.component.spec.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/visibility/visibility.component.ts (85%) rename {src/app/features => mocks}/old-stuff/pages/voting/choices-list/choices-list.component.html (100%) rename {src/app/features => mocks}/old-stuff/pages/voting/choices-list/choices-list.component.scss (100%) rename {src/app/features => mocks}/old-stuff/pages/voting/choices-list/choices-list.component.spec.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/voting/choices-list/choices-list.component.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/voting/comments-list/comments-list.component.html (100%) rename {src/app/features => mocks}/old-stuff/pages/voting/comments-list/comments-list.component.scss (100%) rename {src/app/features => mocks}/old-stuff/pages/voting/comments-list/comments-list.component.spec.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/voting/comments-list/comments-list.component.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/voting/voting-choice/voting-choice.component.html (100%) rename {src/app/features => mocks}/old-stuff/pages/voting/voting-choice/voting-choice.component.scss (98%) rename {src/app/features => mocks}/old-stuff/pages/voting/voting-choice/voting-choice.component.spec.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/voting/voting-choice/voting-choice.component.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/voting/voting-comment/voting-comment.component.html (100%) rename {src/app/features => mocks}/old-stuff/pages/voting/voting-comment/voting-comment.component.scss (100%) rename {src/app/features => mocks}/old-stuff/pages/voting/voting-comment/voting-comment.component.spec.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/voting/voting-comment/voting-comment.component.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/voting/voting-graph/voting-graph.component.html (100%) rename {src/app/features => mocks}/old-stuff/pages/voting/voting-graph/voting-graph.component.scss (100%) rename {src/app/features => mocks}/old-stuff/pages/voting/voting-graph/voting-graph.component.spec.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/voting/voting-graph/voting-graph.component.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/voting/voting-navigation/voting-navigation.component.html (100%) rename {src/app/features => mocks}/old-stuff/pages/voting/voting-navigation/voting-navigation.component.scss (100%) rename {src/app/features => mocks}/old-stuff/pages/voting/voting-navigation/voting-navigation.component.spec.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/voting/voting-navigation/voting-navigation.component.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/voting/voting-summary/voting-summary.component.html (100%) rename {src/app/features => mocks}/old-stuff/pages/voting/voting-summary/voting-summary.component.scss (84%) rename {src/app/features => mocks}/old-stuff/pages/voting/voting-summary/voting-summary.component.spec.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/voting/voting-summary/voting-summary.component.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/voting/voting.component.html (100%) rename {src/app/features => mocks}/old-stuff/pages/voting/voting.component.scss (100%) rename {src/app/features => mocks}/old-stuff/pages/voting/voting.component.spec.ts (100%) rename {src/app/features => mocks}/old-stuff/pages/voting/voting.component.ts (100%) rename {src/app/features => mocks}/old-stuff/services/config.service.ts (99%) rename {src/app/features => mocks}/old-stuff/services/progression.service.spec.ts (100%) rename {src/app/features => mocks}/old-stuff/ui/copy-text/copy-text.component.html (100%) rename {src/app/features => mocks}/old-stuff/ui/copy-text/copy-text.component.scss (100%) rename {src/app/features => mocks}/old-stuff/ui/copy-text/copy-text.component.spec.ts (100%) rename {src/app/features => mocks}/old-stuff/ui/copy-text/copy-text.component.ts (88%) rename {src/app/features => mocks}/old-stuff/ui/directives/resettable-input.directive.spec.ts (100%) rename {src/app/features => mocks}/old-stuff/ui/directives/resettable-input.directive.ts (100%) rename {src/app/features => mocks}/old-stuff/ui/erasable-input/erasable-input.component.html (100%) rename {src/app/features => mocks}/old-stuff/ui/erasable-input/erasable-input.component.scss (100%) rename {src/app/features => mocks}/old-stuff/ui/erasable-input/erasable-input.component.spec.ts (100%) rename {src/app/features => mocks}/old-stuff/ui/erasable-input/erasable-input.component.ts (100%) rename {src/app/features => mocks}/old-stuff/ui/two-links/two-links.component.html (100%) rename {src/app/features => mocks}/old-stuff/ui/two-links/two-links.component.scss (100%) rename {src/app/features => mocks}/old-stuff/ui/two-links/two-links.component.spec.ts (100%) rename {src/app/features => mocks}/old-stuff/ui/two-links/two-links.component.ts (100%) rename src/app/{features/old-stuff/config => core/services}/DateUtilities.ts (100%) rename src/app/{features/old-stuff/config => core/services}/PollUtilities.ts (94%) delete mode 100644 src/app/features/old-stuff/pages/poll/poll-display/poll-display.component.scss diff --git a/src/app/features/old-stuff/config/PollConfig.ts b/mocks/old-stuff/config/PollConfig.ts similarity index 97% rename from src/app/features/old-stuff/config/PollConfig.ts rename to mocks/old-stuff/config/PollConfig.ts index 483b5539..b45b3573 100644 --- a/src/app/features/old-stuff/config/PollConfig.ts +++ b/mocks/old-stuff/config/PollConfig.ts @@ -1,7 +1,7 @@ /** * une option de date dans les sondages spéciaux */ -import { environment } from '../../../../environments/environment'; +import { environment } from '../../../src/environments/environment'; import { DateChoice, defaultAnswers, otherDefaultDates, PollAnswer } from './defaultConfigs'; export interface DateOption { diff --git a/src/app/features/old-stuff/config/defaultConfigs.ts b/mocks/old-stuff/config/defaultConfigs.ts similarity index 100% rename from src/app/features/old-stuff/config/defaultConfigs.ts rename to mocks/old-stuff/config/defaultConfigs.ts diff --git a/src/app/features/old-stuff/custom-lib/date-value-accessor/date-value-accessor.metadata.json b/mocks/old-stuff/custom-lib/date-value-accessor/date-value-accessor.metadata.json similarity index 100% rename from src/app/features/old-stuff/custom-lib/date-value-accessor/date-value-accessor.metadata.json rename to mocks/old-stuff/custom-lib/date-value-accessor/date-value-accessor.metadata.json diff --git a/src/app/features/old-stuff/custom-lib/date-value-accessor/date-value-accessor.ts b/mocks/old-stuff/custom-lib/date-value-accessor/date-value-accessor.ts similarity index 100% rename from src/app/features/old-stuff/custom-lib/date-value-accessor/date-value-accessor.ts rename to mocks/old-stuff/custom-lib/date-value-accessor/date-value-accessor.ts diff --git a/src/app/features/old-stuff/custom-lib/date-value-accessor/index.metadata.json b/mocks/old-stuff/custom-lib/date-value-accessor/index.metadata.json similarity index 100% rename from src/app/features/old-stuff/custom-lib/date-value-accessor/index.metadata.json rename to mocks/old-stuff/custom-lib/date-value-accessor/index.metadata.json diff --git a/src/app/features/old-stuff/custom-lib/date-value-accessor/index.ts b/mocks/old-stuff/custom-lib/date-value-accessor/index.ts similarity index 100% rename from src/app/features/old-stuff/custom-lib/date-value-accessor/index.ts rename to mocks/old-stuff/custom-lib/date-value-accessor/index.ts diff --git a/src/app/features/old-stuff/custom-lib/date-value-accessor/module.metadata.json b/mocks/old-stuff/custom-lib/date-value-accessor/module.metadata.json similarity index 100% rename from src/app/features/old-stuff/custom-lib/date-value-accessor/module.metadata.json rename to mocks/old-stuff/custom-lib/date-value-accessor/module.metadata.json diff --git a/src/app/features/old-stuff/custom-lib/date-value-accessor/module.ts b/mocks/old-stuff/custom-lib/date-value-accessor/module.ts similarity index 100% rename from src/app/features/old-stuff/custom-lib/date-value-accessor/module.ts rename to mocks/old-stuff/custom-lib/date-value-accessor/module.ts diff --git a/src/app/features/old-stuff/mocks/choice.ts b/mocks/old-stuff/mocks/choice.ts similarity index 100% rename from src/app/features/old-stuff/mocks/choice.ts rename to mocks/old-stuff/mocks/choice.ts diff --git a/src/app/features/old-stuff/mocks/comment-same-text-error.json b/mocks/old-stuff/mocks/comment-same-text-error.json similarity index 100% rename from src/app/features/old-stuff/mocks/comment-same-text-error.json rename to mocks/old-stuff/mocks/comment-same-text-error.json diff --git a/src/app/features/old-stuff/mocks/comment-too-fast-error.json b/mocks/old-stuff/mocks/comment-too-fast-error.json similarity index 100% rename from src/app/features/old-stuff/mocks/comment-too-fast-error.json rename to mocks/old-stuff/mocks/comment-too-fast-error.json diff --git a/src/app/features/old-stuff/mocks/config-poll-dessins-animes.json b/mocks/old-stuff/mocks/config-poll-dessins-animes.json similarity index 100% rename from src/app/features/old-stuff/mocks/config-poll-dessins-animes.json rename to mocks/old-stuff/mocks/config-poll-dessins-animes.json diff --git a/src/app/features/old-stuff/mocks/created-comment.json b/mocks/old-stuff/mocks/created-comment.json similarity index 100% rename from src/app/features/old-stuff/mocks/created-comment.json rename to mocks/old-stuff/mocks/created-comment.json diff --git a/src/app/features/old-stuff/mocks/mock-comments.ts b/mocks/old-stuff/mocks/mock-comments.ts similarity index 100% rename from src/app/features/old-stuff/mocks/mock-comments.ts rename to mocks/old-stuff/mocks/mock-comments.ts diff --git a/src/app/features/old-stuff/mocks/mock-graph.ts b/mocks/old-stuff/mocks/mock-graph.ts similarity index 100% rename from src/app/features/old-stuff/mocks/mock-graph.ts rename to mocks/old-stuff/mocks/mock-graph.ts diff --git a/src/app/features/old-stuff/mocks/mock-poll3.ts b/mocks/old-stuff/mocks/mock-poll3.ts similarity index 100% rename from src/app/features/old-stuff/mocks/mock-poll3.ts rename to mocks/old-stuff/mocks/mock-poll3.ts diff --git a/src/app/features/old-stuff/mocks/mock-success-vote.ts b/mocks/old-stuff/mocks/mock-success-vote.ts similarity index 100% rename from src/app/features/old-stuff/mocks/mock-success-vote.ts rename to mocks/old-stuff/mocks/mock-success-vote.ts diff --git a/src/app/features/old-stuff/mocks/mockmypolls.ts b/mocks/old-stuff/mocks/mockmypolls.ts similarity index 100% rename from src/app/features/old-stuff/mocks/mockmypolls.ts rename to mocks/old-stuff/mocks/mockmypolls.ts diff --git a/src/app/features/old-stuff/mocks/votestack-success.json b/mocks/old-stuff/mocks/votestack-success.json similarity index 100% rename from src/app/features/old-stuff/mocks/votestack-success.json rename to mocks/old-stuff/mocks/votestack-success.json diff --git a/src/app/features/old-stuff/old-stuff-routing.module.ts b/mocks/old-stuff/old-stuff-routing.module.ts similarity index 100% rename from src/app/features/old-stuff/old-stuff-routing.module.ts rename to mocks/old-stuff/old-stuff-routing.module.ts diff --git a/src/app/features/old-stuff/old-stuff.module.ts b/mocks/old-stuff/old-stuff.module.ts similarity index 98% rename from src/app/features/old-stuff/old-stuff.module.ts rename to mocks/old-stuff/old-stuff.module.ts index 3dea8e28..c4502415 100644 --- a/src/app/features/old-stuff/old-stuff.module.ts +++ b/mocks/old-stuff/old-stuff.module.ts @@ -3,7 +3,7 @@ import { NgModule } from '@angular/core'; import { TranslateModule } from '@ngx-translate/core'; import { ConfirmationService, DialogModule, MessageService } from 'primeng'; -import { SharedModule } from '../../shared/shared.module'; +import { SharedModule } from '../../src/app/shared/shared.module'; import { DateValueAccessorModule } from './custom-lib/date-value-accessor'; import { OldStuffRoutingModule } from './old-stuff-routing.module'; import { AdminComponent } from './pages/admin/admin.component'; diff --git a/src/app/features/old-stuff/pages/admin/admin.component.html b/mocks/old-stuff/pages/admin/admin.component.html similarity index 100% rename from src/app/features/old-stuff/pages/admin/admin.component.html rename to mocks/old-stuff/pages/admin/admin.component.html diff --git a/src/app/features/old-stuff/pages/admin/admin.component.scss b/mocks/old-stuff/pages/admin/admin.component.scss similarity index 100% rename from src/app/features/old-stuff/pages/admin/admin.component.scss rename to mocks/old-stuff/pages/admin/admin.component.scss diff --git a/src/app/features/old-stuff/pages/admin/admin.component.spec.ts b/mocks/old-stuff/pages/admin/admin.component.spec.ts similarity index 100% rename from src/app/features/old-stuff/pages/admin/admin.component.spec.ts rename to mocks/old-stuff/pages/admin/admin.component.spec.ts diff --git a/src/app/features/old-stuff/pages/admin/admin.component.ts b/mocks/old-stuff/pages/admin/admin.component.ts similarity index 91% rename from src/app/features/old-stuff/pages/admin/admin.component.ts rename to mocks/old-stuff/pages/admin/admin.component.ts index 370973d2..ba67f433 100644 --- a/src/app/features/old-stuff/pages/admin/admin.component.ts +++ b/mocks/old-stuff/pages/admin/admin.component.ts @@ -2,8 +2,8 @@ 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 '../../config/PollUtilities'; -import { environment } from '../../../../../environments/environment'; +import { PollUtilities } from '../../../../src/app/core/services/PollUtilities'; +import { environment } from '../../../../src/environments/environment'; @Component({ selector: 'app-admin', diff --git a/src/app/features/old-stuff/pages/answers/answers.component.html b/mocks/old-stuff/pages/answers/answers.component.html similarity index 100% rename from src/app/features/old-stuff/pages/answers/answers.component.html rename to mocks/old-stuff/pages/answers/answers.component.html diff --git a/src/app/features/old-stuff/pages/answers/answers.component.scss b/mocks/old-stuff/pages/answers/answers.component.scss similarity index 100% rename from src/app/features/old-stuff/pages/answers/answers.component.scss rename to mocks/old-stuff/pages/answers/answers.component.scss diff --git a/src/app/features/old-stuff/pages/answers/answers.component.spec.ts b/mocks/old-stuff/pages/answers/answers.component.spec.ts similarity index 100% rename from src/app/features/old-stuff/pages/answers/answers.component.spec.ts rename to mocks/old-stuff/pages/answers/answers.component.spec.ts diff --git a/src/app/features/old-stuff/pages/answers/answers.component.ts b/mocks/old-stuff/pages/answers/answers.component.ts similarity index 100% rename from src/app/features/old-stuff/pages/answers/answers.component.ts rename to mocks/old-stuff/pages/answers/answers.component.ts diff --git a/src/app/features/old-stuff/pages/create-or-retrieve/create-or-retrieve.component.html b/mocks/old-stuff/pages/create-or-retrieve/create-or-retrieve.component.html similarity index 100% rename from src/app/features/old-stuff/pages/create-or-retrieve/create-or-retrieve.component.html rename to mocks/old-stuff/pages/create-or-retrieve/create-or-retrieve.component.html diff --git a/src/app/features/old-stuff/pages/create-or-retrieve/create-or-retrieve.component.scss b/mocks/old-stuff/pages/create-or-retrieve/create-or-retrieve.component.scss similarity index 100% rename from src/app/features/old-stuff/pages/create-or-retrieve/create-or-retrieve.component.scss rename to mocks/old-stuff/pages/create-or-retrieve/create-or-retrieve.component.scss diff --git a/src/app/features/old-stuff/pages/create-or-retrieve/create-or-retrieve.component.spec.ts b/mocks/old-stuff/pages/create-or-retrieve/create-or-retrieve.component.spec.ts similarity index 100% rename from src/app/features/old-stuff/pages/create-or-retrieve/create-or-retrieve.component.spec.ts rename to mocks/old-stuff/pages/create-or-retrieve/create-or-retrieve.component.spec.ts diff --git a/src/app/features/old-stuff/pages/create-or-retrieve/create-or-retrieve.component.ts b/mocks/old-stuff/pages/create-or-retrieve/create-or-retrieve.component.ts similarity index 100% rename from src/app/features/old-stuff/pages/create-or-retrieve/create-or-retrieve.component.ts rename to mocks/old-stuff/pages/create-or-retrieve/create-or-retrieve.component.ts diff --git a/src/app/features/old-stuff/pages/dates/dates.component.html b/mocks/old-stuff/pages/dates/dates.component.html similarity index 100% rename from src/app/features/old-stuff/pages/dates/dates.component.html rename to mocks/old-stuff/pages/dates/dates.component.html diff --git a/src/app/features/old-stuff/pages/dates/dates.component.scss b/mocks/old-stuff/pages/dates/dates.component.scss similarity index 100% rename from src/app/features/old-stuff/pages/dates/dates.component.scss rename to mocks/old-stuff/pages/dates/dates.component.scss diff --git a/src/app/features/old-stuff/pages/dates/dates.component.spec.ts b/mocks/old-stuff/pages/dates/dates.component.spec.ts similarity index 100% rename from src/app/features/old-stuff/pages/dates/dates.component.spec.ts rename to mocks/old-stuff/pages/dates/dates.component.spec.ts diff --git a/src/app/features/old-stuff/pages/dates/dates.component.ts b/mocks/old-stuff/pages/dates/dates.component.ts similarity index 95% rename from src/app/features/old-stuff/pages/dates/dates.component.ts rename to mocks/old-stuff/pages/dates/dates.component.ts index 1caed356..f78a93d9 100644 --- a/src/app/features/old-stuff/pages/dates/dates.component.ts +++ b/mocks/old-stuff/pages/dates/dates.component.ts @@ -1,8 +1,8 @@ import { DOCUMENT } from '@angular/common'; import { ChangeDetectorRef, Component, Inject, OnInit } from '@angular/core'; -import { ToastService } from '../../../../core/services/toast.service'; -import { DateUtilities } from '../../config/DateUtilities'; +import { ToastService } from '../../../../src/app/core/services/toast.service'; +import { DateUtilities } from '../../../../src/app/core/services/DateUtilities'; import { otherDefaultDates } from '../../config/defaultConfigs'; import { ConfigService } from '../../services/config.service'; import { BaseComponent } from '../example/base-page/base.component'; diff --git a/src/app/features/old-stuff/pages/end-confirmation/end-confirmation.component.html b/mocks/old-stuff/pages/end-confirmation/end-confirmation.component.html similarity index 100% rename from src/app/features/old-stuff/pages/end-confirmation/end-confirmation.component.html rename to mocks/old-stuff/pages/end-confirmation/end-confirmation.component.html diff --git a/src/app/features/old-stuff/pages/end-confirmation/end-confirmation.component.scss b/mocks/old-stuff/pages/end-confirmation/end-confirmation.component.scss similarity index 100% rename from src/app/features/old-stuff/pages/end-confirmation/end-confirmation.component.scss rename to mocks/old-stuff/pages/end-confirmation/end-confirmation.component.scss diff --git a/src/app/features/old-stuff/pages/end-confirmation/end-confirmation.component.spec.ts b/mocks/old-stuff/pages/end-confirmation/end-confirmation.component.spec.ts similarity index 100% rename from src/app/features/old-stuff/pages/end-confirmation/end-confirmation.component.spec.ts rename to mocks/old-stuff/pages/end-confirmation/end-confirmation.component.spec.ts diff --git a/src/app/features/old-stuff/pages/end-confirmation/end-confirmation.component.ts b/mocks/old-stuff/pages/end-confirmation/end-confirmation.component.ts similarity index 90% rename from src/app/features/old-stuff/pages/end-confirmation/end-confirmation.component.ts rename to mocks/old-stuff/pages/end-confirmation/end-confirmation.component.ts index ac4eab66..cba66989 100644 --- a/src/app/features/old-stuff/pages/end-confirmation/end-confirmation.component.ts +++ b/mocks/old-stuff/pages/end-confirmation/end-confirmation.component.ts @@ -1,7 +1,7 @@ import { HttpClient } from '@angular/common/http'; import { Component, OnInit } from '@angular/core'; -import { ToastService } from '../../../../core/services/toast.service'; +import { ToastService } from '../../../../src/app/core/services/toast.service'; import { ConfigService } from '../../services/config.service'; import { BaseComponent } from '../example/base-page/base.component'; diff --git a/src/app/features/old-stuff/pages/example/base-page/base.component.html b/mocks/old-stuff/pages/example/base-page/base.component.html similarity index 100% rename from src/app/features/old-stuff/pages/example/base-page/base.component.html rename to mocks/old-stuff/pages/example/base-page/base.component.html diff --git a/src/app/features/old-stuff/pages/example/base-page/base.component.scss b/mocks/old-stuff/pages/example/base-page/base.component.scss similarity index 100% rename from src/app/features/old-stuff/pages/example/base-page/base.component.scss rename to mocks/old-stuff/pages/example/base-page/base.component.scss diff --git a/src/app/features/old-stuff/pages/example/base-page/base.component.spec.ts b/mocks/old-stuff/pages/example/base-page/base.component.spec.ts similarity index 100% rename from src/app/features/old-stuff/pages/example/base-page/base.component.spec.ts rename to mocks/old-stuff/pages/example/base-page/base.component.spec.ts diff --git a/src/app/features/old-stuff/pages/example/base-page/base.component.ts b/mocks/old-stuff/pages/example/base-page/base.component.ts similarity index 100% rename from src/app/features/old-stuff/pages/example/base-page/base.component.ts rename to mocks/old-stuff/pages/example/base-page/base.component.ts diff --git a/src/app/features/old-stuff/pages/example/kind/kind.component.html b/mocks/old-stuff/pages/example/kind/kind.component.html similarity index 98% rename from src/app/features/old-stuff/pages/example/kind/kind.component.html rename to mocks/old-stuff/pages/example/kind/kind.component.html index 10c0467e..0cf28006 100644 --- a/src/app/features/old-stuff/pages/example/kind/kind.component.html +++ b/mocks/old-stuff/pages/example/kind/kind.component.html @@ -47,7 +47,7 @@
- + primary - outline - default diff --git a/src/app/features/old-stuff/pages/example/kind/kind.component.scss b/mocks/old-stuff/pages/example/kind/kind.component.scss similarity index 100% rename from src/app/features/old-stuff/pages/example/kind/kind.component.scss rename to mocks/old-stuff/pages/example/kind/kind.component.scss diff --git a/src/app/features/old-stuff/pages/example/kind/kind.component.spec.ts b/mocks/old-stuff/pages/example/kind/kind.component.spec.ts similarity index 100% rename from src/app/features/old-stuff/pages/example/kind/kind.component.spec.ts rename to mocks/old-stuff/pages/example/kind/kind.component.spec.ts diff --git a/src/app/features/old-stuff/pages/example/kind/kind.component.ts b/mocks/old-stuff/pages/example/kind/kind.component.ts similarity index 100% rename from src/app/features/old-stuff/pages/example/kind/kind.component.ts rename to mocks/old-stuff/pages/example/kind/kind.component.ts diff --git a/src/app/features/old-stuff/pages/example/pictures/pictures.component.html b/mocks/old-stuff/pages/example/pictures/pictures.component.html similarity index 100% rename from src/app/features/old-stuff/pages/example/pictures/pictures.component.html rename to mocks/old-stuff/pages/example/pictures/pictures.component.html diff --git a/src/app/features/old-stuff/pages/example/pictures/pictures.component.scss b/mocks/old-stuff/pages/example/pictures/pictures.component.scss similarity index 100% rename from src/app/features/old-stuff/pages/example/pictures/pictures.component.scss rename to mocks/old-stuff/pages/example/pictures/pictures.component.scss diff --git a/src/app/features/old-stuff/pages/example/pictures/pictures.component.spec.ts b/mocks/old-stuff/pages/example/pictures/pictures.component.spec.ts similarity index 100% rename from src/app/features/old-stuff/pages/example/pictures/pictures.component.spec.ts rename to mocks/old-stuff/pages/example/pictures/pictures.component.spec.ts diff --git a/src/app/features/old-stuff/pages/example/pictures/pictures.component.ts b/mocks/old-stuff/pages/example/pictures/pictures.component.ts similarity index 100% rename from src/app/features/old-stuff/pages/example/pictures/pictures.component.ts rename to mocks/old-stuff/pages/example/pictures/pictures.component.ts diff --git a/src/app/features/old-stuff/pages/home/home.component.html b/mocks/old-stuff/pages/home/home.component.html similarity index 100% rename from src/app/features/old-stuff/pages/home/home.component.html rename to mocks/old-stuff/pages/home/home.component.html diff --git a/src/app/features/old-stuff/pages/home/home.component.scss b/mocks/old-stuff/pages/home/home.component.scss similarity index 100% rename from src/app/features/old-stuff/pages/home/home.component.scss rename to mocks/old-stuff/pages/home/home.component.scss diff --git a/src/app/features/old-stuff/pages/home/home.component.spec.ts b/mocks/old-stuff/pages/home/home.component.spec.ts similarity index 100% rename from src/app/features/old-stuff/pages/home/home.component.spec.ts rename to mocks/old-stuff/pages/home/home.component.spec.ts diff --git a/src/app/features/old-stuff/pages/home/home.component.ts b/mocks/old-stuff/pages/home/home.component.ts similarity index 100% rename from src/app/features/old-stuff/pages/home/home.component.ts rename to mocks/old-stuff/pages/home/home.component.ts diff --git a/src/app/features/old-stuff/pages/password/password.component.html b/mocks/old-stuff/pages/password/password.component.html similarity index 100% rename from src/app/features/old-stuff/pages/password/password.component.html rename to mocks/old-stuff/pages/password/password.component.html diff --git a/src/app/features/old-stuff/pages/password/password.component.scss b/mocks/old-stuff/pages/password/password.component.scss similarity index 100% rename from src/app/features/old-stuff/pages/password/password.component.scss rename to mocks/old-stuff/pages/password/password.component.scss diff --git a/src/app/features/old-stuff/pages/password/password.component.spec.ts b/mocks/old-stuff/pages/password/password.component.spec.ts similarity index 100% rename from src/app/features/old-stuff/pages/password/password.component.spec.ts rename to mocks/old-stuff/pages/password/password.component.spec.ts diff --git a/src/app/features/old-stuff/pages/password/password.component.ts b/mocks/old-stuff/pages/password/password.component.ts similarity index 100% rename from src/app/features/old-stuff/pages/password/password.component.ts rename to mocks/old-stuff/pages/password/password.component.ts diff --git a/src/app/features/old-stuff/pages/poll/poll-display/poll-display.component.html b/mocks/old-stuff/pages/poll/poll-display/poll-display.component.html similarity index 100% rename from src/app/features/old-stuff/pages/poll/poll-display/poll-display.component.html rename to mocks/old-stuff/pages/poll/poll-display/poll-display.component.html diff --git a/mocks/old-stuff/pages/poll/poll-display/poll-display.component.scss b/mocks/old-stuff/pages/poll/poll-display/poll-display.component.scss new file mode 100644 index 00000000..97075968 --- /dev/null +++ b/mocks/old-stuff/pages/poll/poll-display/poll-display.component.scss @@ -0,0 +1 @@ +@import '../../../../../src/styles/variables'; diff --git a/src/app/features/old-stuff/pages/poll/poll-display/poll-display.component.spec.ts b/mocks/old-stuff/pages/poll/poll-display/poll-display.component.spec.ts similarity index 100% rename from src/app/features/old-stuff/pages/poll/poll-display/poll-display.component.spec.ts rename to mocks/old-stuff/pages/poll/poll-display/poll-display.component.spec.ts diff --git a/src/app/features/old-stuff/pages/poll/poll-display/poll-display.component.ts b/mocks/old-stuff/pages/poll/poll-display/poll-display.component.ts similarity index 96% rename from src/app/features/old-stuff/pages/poll/poll-display/poll-display.component.ts rename to mocks/old-stuff/pages/poll/poll-display/poll-display.component.ts index 9489db1a..768b8686 100644 --- a/src/app/features/old-stuff/pages/poll/poll-display/poll-display.component.ts +++ b/mocks/old-stuff/pages/poll/poll-display/poll-display.component.ts @@ -3,7 +3,7 @@ import { BaseComponent } from '../../example/base-page/base.component'; import { ConfigService } from '../../../services/config.service'; import { mockComments } from '../../../mocks/mock-comments'; import { ActivatedRoute, Router } from '@angular/router'; -import { environment } from '../../../../../../environments/environment'; +import { environment } from '../../../../../src/environments/environment'; import { mockPoll3 } from '../../../mocks/mock-poll3'; @Component({ diff --git a/src/app/features/old-stuff/pages/poll/poll-graphic/poll-graphic.component.html b/mocks/old-stuff/pages/poll/poll-graphic/poll-graphic.component.html similarity index 100% rename from src/app/features/old-stuff/pages/poll/poll-graphic/poll-graphic.component.html rename to mocks/old-stuff/pages/poll/poll-graphic/poll-graphic.component.html diff --git a/src/app/features/old-stuff/pages/poll/poll-graphic/poll-graphic.component.scss b/mocks/old-stuff/pages/poll/poll-graphic/poll-graphic.component.scss similarity index 100% rename from src/app/features/old-stuff/pages/poll/poll-graphic/poll-graphic.component.scss rename to mocks/old-stuff/pages/poll/poll-graphic/poll-graphic.component.scss diff --git a/src/app/features/old-stuff/pages/poll/poll-graphic/poll-graphic.component.spec.ts b/mocks/old-stuff/pages/poll/poll-graphic/poll-graphic.component.spec.ts similarity index 100% rename from src/app/features/old-stuff/pages/poll/poll-graphic/poll-graphic.component.spec.ts rename to mocks/old-stuff/pages/poll/poll-graphic/poll-graphic.component.spec.ts diff --git a/src/app/features/old-stuff/pages/poll/poll-graphic/poll-graphic.component.ts b/mocks/old-stuff/pages/poll/poll-graphic/poll-graphic.component.ts similarity index 100% rename from src/app/features/old-stuff/pages/poll/poll-graphic/poll-graphic.component.ts rename to mocks/old-stuff/pages/poll/poll-graphic/poll-graphic.component.ts diff --git a/src/app/features/old-stuff/pages/resume/resume.component.html b/mocks/old-stuff/pages/resume/resume.component.html similarity index 100% rename from src/app/features/old-stuff/pages/resume/resume.component.html rename to mocks/old-stuff/pages/resume/resume.component.html diff --git a/src/app/features/old-stuff/pages/resume/resume.component.scss b/mocks/old-stuff/pages/resume/resume.component.scss similarity index 100% rename from src/app/features/old-stuff/pages/resume/resume.component.scss rename to mocks/old-stuff/pages/resume/resume.component.scss diff --git a/src/app/features/old-stuff/pages/resume/resume.component.spec.ts b/mocks/old-stuff/pages/resume/resume.component.spec.ts similarity index 100% rename from src/app/features/old-stuff/pages/resume/resume.component.spec.ts rename to mocks/old-stuff/pages/resume/resume.component.spec.ts diff --git a/src/app/features/old-stuff/pages/resume/resume.component.ts b/mocks/old-stuff/pages/resume/resume.component.ts similarity index 100% rename from src/app/features/old-stuff/pages/resume/resume.component.ts rename to mocks/old-stuff/pages/resume/resume.component.ts diff --git a/src/app/features/old-stuff/pages/visibility/visibility.component.html b/mocks/old-stuff/pages/visibility/visibility.component.html similarity index 100% rename from src/app/features/old-stuff/pages/visibility/visibility.component.html rename to mocks/old-stuff/pages/visibility/visibility.component.html diff --git a/src/app/features/old-stuff/pages/visibility/visibility.component.scss b/mocks/old-stuff/pages/visibility/visibility.component.scss similarity index 100% rename from src/app/features/old-stuff/pages/visibility/visibility.component.scss rename to mocks/old-stuff/pages/visibility/visibility.component.scss diff --git a/src/app/features/old-stuff/pages/visibility/visibility.component.spec.ts b/mocks/old-stuff/pages/visibility/visibility.component.spec.ts similarity index 100% rename from src/app/features/old-stuff/pages/visibility/visibility.component.spec.ts rename to mocks/old-stuff/pages/visibility/visibility.component.spec.ts diff --git a/src/app/features/old-stuff/pages/visibility/visibility.component.ts b/mocks/old-stuff/pages/visibility/visibility.component.ts similarity index 85% rename from src/app/features/old-stuff/pages/visibility/visibility.component.ts rename to mocks/old-stuff/pages/visibility/visibility.component.ts index e29a8fb1..63f581f4 100644 --- a/src/app/features/old-stuff/pages/visibility/visibility.component.ts +++ b/mocks/old-stuff/pages/visibility/visibility.component.ts @@ -1,8 +1,8 @@ import { Location } from '@angular/common'; import { Component, OnInit } from '@angular/core'; -import { environment } from '../../../../../environments/environment'; -import { PollUtilities } from '../../config/PollUtilities'; +import { environment } from '../../../../src/environments/environment'; +import { PollUtilities } from '../../../../src/app/core/services/PollUtilities'; import { ConfigService } from '../../services/config.service'; import { BaseComponent } from '../example/base-page/base.component'; diff --git a/src/app/features/old-stuff/pages/voting/choices-list/choices-list.component.html b/mocks/old-stuff/pages/voting/choices-list/choices-list.component.html similarity index 100% rename from src/app/features/old-stuff/pages/voting/choices-list/choices-list.component.html rename to mocks/old-stuff/pages/voting/choices-list/choices-list.component.html diff --git a/src/app/features/old-stuff/pages/voting/choices-list/choices-list.component.scss b/mocks/old-stuff/pages/voting/choices-list/choices-list.component.scss similarity index 100% rename from src/app/features/old-stuff/pages/voting/choices-list/choices-list.component.scss rename to mocks/old-stuff/pages/voting/choices-list/choices-list.component.scss diff --git a/src/app/features/old-stuff/pages/voting/choices-list/choices-list.component.spec.ts b/mocks/old-stuff/pages/voting/choices-list/choices-list.component.spec.ts similarity index 100% rename from src/app/features/old-stuff/pages/voting/choices-list/choices-list.component.spec.ts rename to mocks/old-stuff/pages/voting/choices-list/choices-list.component.spec.ts diff --git a/src/app/features/old-stuff/pages/voting/choices-list/choices-list.component.ts b/mocks/old-stuff/pages/voting/choices-list/choices-list.component.ts similarity index 100% rename from src/app/features/old-stuff/pages/voting/choices-list/choices-list.component.ts rename to mocks/old-stuff/pages/voting/choices-list/choices-list.component.ts diff --git a/src/app/features/old-stuff/pages/voting/comments-list/comments-list.component.html b/mocks/old-stuff/pages/voting/comments-list/comments-list.component.html similarity index 100% rename from src/app/features/old-stuff/pages/voting/comments-list/comments-list.component.html rename to mocks/old-stuff/pages/voting/comments-list/comments-list.component.html diff --git a/src/app/features/old-stuff/pages/voting/comments-list/comments-list.component.scss b/mocks/old-stuff/pages/voting/comments-list/comments-list.component.scss similarity index 100% rename from src/app/features/old-stuff/pages/voting/comments-list/comments-list.component.scss rename to mocks/old-stuff/pages/voting/comments-list/comments-list.component.scss diff --git a/src/app/features/old-stuff/pages/voting/comments-list/comments-list.component.spec.ts b/mocks/old-stuff/pages/voting/comments-list/comments-list.component.spec.ts similarity index 100% rename from src/app/features/old-stuff/pages/voting/comments-list/comments-list.component.spec.ts rename to mocks/old-stuff/pages/voting/comments-list/comments-list.component.spec.ts diff --git a/src/app/features/old-stuff/pages/voting/comments-list/comments-list.component.ts b/mocks/old-stuff/pages/voting/comments-list/comments-list.component.ts similarity index 100% rename from src/app/features/old-stuff/pages/voting/comments-list/comments-list.component.ts rename to mocks/old-stuff/pages/voting/comments-list/comments-list.component.ts diff --git a/src/app/features/old-stuff/pages/voting/voting-choice/voting-choice.component.html b/mocks/old-stuff/pages/voting/voting-choice/voting-choice.component.html similarity index 100% rename from src/app/features/old-stuff/pages/voting/voting-choice/voting-choice.component.html rename to mocks/old-stuff/pages/voting/voting-choice/voting-choice.component.html diff --git a/src/app/features/old-stuff/pages/voting/voting-choice/voting-choice.component.scss b/mocks/old-stuff/pages/voting/voting-choice/voting-choice.component.scss similarity index 98% rename from src/app/features/old-stuff/pages/voting/voting-choice/voting-choice.component.scss rename to mocks/old-stuff/pages/voting/voting-choice/voting-choice.component.scss index 4b2f821e..c619c0b3 100644 --- a/src/app/features/old-stuff/pages/voting/voting-choice/voting-choice.component.scss +++ b/mocks/old-stuff/pages/voting/voting-choice/voting-choice.component.scss @@ -5,7 +5,7 @@ // -- IMPORTS // ---------------------------- -@import '../../../../../../styles/variables'; +@import '../../../../../src/styles/variables'; // -- VARIABLES // ---------------------------- diff --git a/src/app/features/old-stuff/pages/voting/voting-choice/voting-choice.component.spec.ts b/mocks/old-stuff/pages/voting/voting-choice/voting-choice.component.spec.ts similarity index 100% rename from src/app/features/old-stuff/pages/voting/voting-choice/voting-choice.component.spec.ts rename to mocks/old-stuff/pages/voting/voting-choice/voting-choice.component.spec.ts diff --git a/src/app/features/old-stuff/pages/voting/voting-choice/voting-choice.component.ts b/mocks/old-stuff/pages/voting/voting-choice/voting-choice.component.ts similarity index 100% rename from src/app/features/old-stuff/pages/voting/voting-choice/voting-choice.component.ts rename to mocks/old-stuff/pages/voting/voting-choice/voting-choice.component.ts diff --git a/src/app/features/old-stuff/pages/voting/voting-comment/voting-comment.component.html b/mocks/old-stuff/pages/voting/voting-comment/voting-comment.component.html similarity index 100% rename from src/app/features/old-stuff/pages/voting/voting-comment/voting-comment.component.html rename to mocks/old-stuff/pages/voting/voting-comment/voting-comment.component.html diff --git a/src/app/features/old-stuff/pages/voting/voting-comment/voting-comment.component.scss b/mocks/old-stuff/pages/voting/voting-comment/voting-comment.component.scss similarity index 100% rename from src/app/features/old-stuff/pages/voting/voting-comment/voting-comment.component.scss rename to mocks/old-stuff/pages/voting/voting-comment/voting-comment.component.scss diff --git a/src/app/features/old-stuff/pages/voting/voting-comment/voting-comment.component.spec.ts b/mocks/old-stuff/pages/voting/voting-comment/voting-comment.component.spec.ts similarity index 100% rename from src/app/features/old-stuff/pages/voting/voting-comment/voting-comment.component.spec.ts rename to mocks/old-stuff/pages/voting/voting-comment/voting-comment.component.spec.ts diff --git a/src/app/features/old-stuff/pages/voting/voting-comment/voting-comment.component.ts b/mocks/old-stuff/pages/voting/voting-comment/voting-comment.component.ts similarity index 100% rename from src/app/features/old-stuff/pages/voting/voting-comment/voting-comment.component.ts rename to mocks/old-stuff/pages/voting/voting-comment/voting-comment.component.ts diff --git a/src/app/features/old-stuff/pages/voting/voting-graph/voting-graph.component.html b/mocks/old-stuff/pages/voting/voting-graph/voting-graph.component.html similarity index 100% rename from src/app/features/old-stuff/pages/voting/voting-graph/voting-graph.component.html rename to mocks/old-stuff/pages/voting/voting-graph/voting-graph.component.html diff --git a/src/app/features/old-stuff/pages/voting/voting-graph/voting-graph.component.scss b/mocks/old-stuff/pages/voting/voting-graph/voting-graph.component.scss similarity index 100% rename from src/app/features/old-stuff/pages/voting/voting-graph/voting-graph.component.scss rename to mocks/old-stuff/pages/voting/voting-graph/voting-graph.component.scss diff --git a/src/app/features/old-stuff/pages/voting/voting-graph/voting-graph.component.spec.ts b/mocks/old-stuff/pages/voting/voting-graph/voting-graph.component.spec.ts similarity index 100% rename from src/app/features/old-stuff/pages/voting/voting-graph/voting-graph.component.spec.ts rename to mocks/old-stuff/pages/voting/voting-graph/voting-graph.component.spec.ts diff --git a/src/app/features/old-stuff/pages/voting/voting-graph/voting-graph.component.ts b/mocks/old-stuff/pages/voting/voting-graph/voting-graph.component.ts similarity index 100% rename from src/app/features/old-stuff/pages/voting/voting-graph/voting-graph.component.ts rename to mocks/old-stuff/pages/voting/voting-graph/voting-graph.component.ts diff --git a/src/app/features/old-stuff/pages/voting/voting-navigation/voting-navigation.component.html b/mocks/old-stuff/pages/voting/voting-navigation/voting-navigation.component.html similarity index 100% rename from src/app/features/old-stuff/pages/voting/voting-navigation/voting-navigation.component.html rename to mocks/old-stuff/pages/voting/voting-navigation/voting-navigation.component.html diff --git a/src/app/features/old-stuff/pages/voting/voting-navigation/voting-navigation.component.scss b/mocks/old-stuff/pages/voting/voting-navigation/voting-navigation.component.scss similarity index 100% rename from src/app/features/old-stuff/pages/voting/voting-navigation/voting-navigation.component.scss rename to mocks/old-stuff/pages/voting/voting-navigation/voting-navigation.component.scss diff --git a/src/app/features/old-stuff/pages/voting/voting-navigation/voting-navigation.component.spec.ts b/mocks/old-stuff/pages/voting/voting-navigation/voting-navigation.component.spec.ts similarity index 100% rename from src/app/features/old-stuff/pages/voting/voting-navigation/voting-navigation.component.spec.ts rename to mocks/old-stuff/pages/voting/voting-navigation/voting-navigation.component.spec.ts diff --git a/src/app/features/old-stuff/pages/voting/voting-navigation/voting-navigation.component.ts b/mocks/old-stuff/pages/voting/voting-navigation/voting-navigation.component.ts similarity index 100% rename from src/app/features/old-stuff/pages/voting/voting-navigation/voting-navigation.component.ts rename to mocks/old-stuff/pages/voting/voting-navigation/voting-navigation.component.ts diff --git a/src/app/features/old-stuff/pages/voting/voting-summary/voting-summary.component.html b/mocks/old-stuff/pages/voting/voting-summary/voting-summary.component.html similarity index 100% rename from src/app/features/old-stuff/pages/voting/voting-summary/voting-summary.component.html rename to mocks/old-stuff/pages/voting/voting-summary/voting-summary.component.html diff --git a/src/app/features/old-stuff/pages/voting/voting-summary/voting-summary.component.scss b/mocks/old-stuff/pages/voting/voting-summary/voting-summary.component.scss similarity index 84% rename from src/app/features/old-stuff/pages/voting/voting-summary/voting-summary.component.scss rename to mocks/old-stuff/pages/voting/voting-summary/voting-summary.component.scss index df5b9f7c..8fc60aa0 100644 --- a/src/app/features/old-stuff/pages/voting/voting-summary/voting-summary.component.scss +++ b/mocks/old-stuff/pages/voting/voting-summary/voting-summary.component.scss @@ -1,4 +1,4 @@ -@import '../../../../../../styles/variables'; +@import '../../../../../src/styles/variables'; .person { font-weight: 700; diff --git a/src/app/features/old-stuff/pages/voting/voting-summary/voting-summary.component.spec.ts b/mocks/old-stuff/pages/voting/voting-summary/voting-summary.component.spec.ts similarity index 100% rename from src/app/features/old-stuff/pages/voting/voting-summary/voting-summary.component.spec.ts rename to mocks/old-stuff/pages/voting/voting-summary/voting-summary.component.spec.ts diff --git a/src/app/features/old-stuff/pages/voting/voting-summary/voting-summary.component.ts b/mocks/old-stuff/pages/voting/voting-summary/voting-summary.component.ts similarity index 100% rename from src/app/features/old-stuff/pages/voting/voting-summary/voting-summary.component.ts rename to mocks/old-stuff/pages/voting/voting-summary/voting-summary.component.ts diff --git a/src/app/features/old-stuff/pages/voting/voting.component.html b/mocks/old-stuff/pages/voting/voting.component.html similarity index 100% rename from src/app/features/old-stuff/pages/voting/voting.component.html rename to mocks/old-stuff/pages/voting/voting.component.html diff --git a/src/app/features/old-stuff/pages/voting/voting.component.scss b/mocks/old-stuff/pages/voting/voting.component.scss similarity index 100% rename from src/app/features/old-stuff/pages/voting/voting.component.scss rename to mocks/old-stuff/pages/voting/voting.component.scss diff --git a/src/app/features/old-stuff/pages/voting/voting.component.spec.ts b/mocks/old-stuff/pages/voting/voting.component.spec.ts similarity index 100% rename from src/app/features/old-stuff/pages/voting/voting.component.spec.ts rename to mocks/old-stuff/pages/voting/voting.component.spec.ts diff --git a/src/app/features/old-stuff/pages/voting/voting.component.ts b/mocks/old-stuff/pages/voting/voting.component.ts similarity index 100% rename from src/app/features/old-stuff/pages/voting/voting.component.ts rename to mocks/old-stuff/pages/voting/voting.component.ts diff --git a/src/app/features/old-stuff/services/config.service.ts b/mocks/old-stuff/services/config.service.ts similarity index 99% rename from src/app/features/old-stuff/services/config.service.ts rename to mocks/old-stuff/services/config.service.ts index 50b10d55..9e1d6434 100644 --- a/src/app/features/old-stuff/services/config.service.ts +++ b/mocks/old-stuff/services/config.service.ts @@ -3,10 +3,10 @@ import { Injectable } from '@angular/core'; import { Router } from '@angular/router'; import { ConfirmationService } from 'primeng/api'; -import { environment } from '../../../../environments/environment'; -import { ToastService } from '../../../core/services/toast.service'; +import { environment } from '../../../src/environments/environment'; +import { ToastService } from '../../../src/app/core/services/toast.service'; import { PollConfig } from '../config/PollConfig'; -import { PollUtilities } from '../config/PollUtilities'; +import { PollUtilities } from '../../../src/app/core/services/PollUtilities'; import { mockPoll3 } from '../mocks/mock-poll3'; import { mockSuccessVote } from '../mocks/mock-success-vote'; import { mockMyPolls } from '../mocks/mockmypolls'; diff --git a/src/app/features/old-stuff/services/progression.service.spec.ts b/mocks/old-stuff/services/progression.service.spec.ts similarity index 100% rename from src/app/features/old-stuff/services/progression.service.spec.ts rename to mocks/old-stuff/services/progression.service.spec.ts diff --git a/src/app/features/old-stuff/ui/copy-text/copy-text.component.html b/mocks/old-stuff/ui/copy-text/copy-text.component.html similarity index 100% rename from src/app/features/old-stuff/ui/copy-text/copy-text.component.html rename to mocks/old-stuff/ui/copy-text/copy-text.component.html diff --git a/src/app/features/old-stuff/ui/copy-text/copy-text.component.scss b/mocks/old-stuff/ui/copy-text/copy-text.component.scss similarity index 100% rename from src/app/features/old-stuff/ui/copy-text/copy-text.component.scss rename to mocks/old-stuff/ui/copy-text/copy-text.component.scss diff --git a/src/app/features/old-stuff/ui/copy-text/copy-text.component.spec.ts b/mocks/old-stuff/ui/copy-text/copy-text.component.spec.ts similarity index 100% rename from src/app/features/old-stuff/ui/copy-text/copy-text.component.spec.ts rename to mocks/old-stuff/ui/copy-text/copy-text.component.spec.ts diff --git a/src/app/features/old-stuff/ui/copy-text/copy-text.component.ts b/mocks/old-stuff/ui/copy-text/copy-text.component.ts similarity index 88% rename from src/app/features/old-stuff/ui/copy-text/copy-text.component.ts rename to mocks/old-stuff/ui/copy-text/copy-text.component.ts index 31c295b9..c9029eb2 100644 --- a/src/app/features/old-stuff/ui/copy-text/copy-text.component.ts +++ b/mocks/old-stuff/ui/copy-text/copy-text.component.ts @@ -1,7 +1,7 @@ import { Component, Input, OnInit } from '@angular/core'; import { ClipboardService } from 'ngx-clipboard'; -import { ToastService } from '../../../../core/services/toast.service'; +import { ToastService } from '../../../../src/app/core/services/toast.service'; @Component({ selector: 'app-copy-text', diff --git a/src/app/features/old-stuff/ui/directives/resettable-input.directive.spec.ts b/mocks/old-stuff/ui/directives/resettable-input.directive.spec.ts similarity index 100% rename from src/app/features/old-stuff/ui/directives/resettable-input.directive.spec.ts rename to mocks/old-stuff/ui/directives/resettable-input.directive.spec.ts diff --git a/src/app/features/old-stuff/ui/directives/resettable-input.directive.ts b/mocks/old-stuff/ui/directives/resettable-input.directive.ts similarity index 100% rename from src/app/features/old-stuff/ui/directives/resettable-input.directive.ts rename to mocks/old-stuff/ui/directives/resettable-input.directive.ts diff --git a/src/app/features/old-stuff/ui/erasable-input/erasable-input.component.html b/mocks/old-stuff/ui/erasable-input/erasable-input.component.html similarity index 100% rename from src/app/features/old-stuff/ui/erasable-input/erasable-input.component.html rename to mocks/old-stuff/ui/erasable-input/erasable-input.component.html diff --git a/src/app/features/old-stuff/ui/erasable-input/erasable-input.component.scss b/mocks/old-stuff/ui/erasable-input/erasable-input.component.scss similarity index 100% rename from src/app/features/old-stuff/ui/erasable-input/erasable-input.component.scss rename to mocks/old-stuff/ui/erasable-input/erasable-input.component.scss diff --git a/src/app/features/old-stuff/ui/erasable-input/erasable-input.component.spec.ts b/mocks/old-stuff/ui/erasable-input/erasable-input.component.spec.ts similarity index 100% rename from src/app/features/old-stuff/ui/erasable-input/erasable-input.component.spec.ts rename to mocks/old-stuff/ui/erasable-input/erasable-input.component.spec.ts diff --git a/src/app/features/old-stuff/ui/erasable-input/erasable-input.component.ts b/mocks/old-stuff/ui/erasable-input/erasable-input.component.ts similarity index 100% rename from src/app/features/old-stuff/ui/erasable-input/erasable-input.component.ts rename to mocks/old-stuff/ui/erasable-input/erasable-input.component.ts diff --git a/src/app/features/old-stuff/ui/two-links/two-links.component.html b/mocks/old-stuff/ui/two-links/two-links.component.html similarity index 100% rename from src/app/features/old-stuff/ui/two-links/two-links.component.html rename to mocks/old-stuff/ui/two-links/two-links.component.html diff --git a/src/app/features/old-stuff/ui/two-links/two-links.component.scss b/mocks/old-stuff/ui/two-links/two-links.component.scss similarity index 100% rename from src/app/features/old-stuff/ui/two-links/two-links.component.scss rename to mocks/old-stuff/ui/two-links/two-links.component.scss diff --git a/src/app/features/old-stuff/ui/two-links/two-links.component.spec.ts b/mocks/old-stuff/ui/two-links/two-links.component.spec.ts similarity index 100% rename from src/app/features/old-stuff/ui/two-links/two-links.component.spec.ts rename to mocks/old-stuff/ui/two-links/two-links.component.spec.ts diff --git a/src/app/features/old-stuff/ui/two-links/two-links.component.ts b/mocks/old-stuff/ui/two-links/two-links.component.ts similarity index 100% rename from src/app/features/old-stuff/ui/two-links/two-links.component.ts rename to mocks/old-stuff/ui/two-links/two-links.component.ts diff --git a/src/app/core/components/footer/footer.component.html b/src/app/core/components/footer/footer.component.html index a62e391f..fbf8ee53 100644 --- a/src/app/core/components/footer/footer.component.html +++ b/src/app/core/components/footer/footer.component.html @@ -26,34 +26,5 @@ canal Matrix

-
- Environnement de développement: voici des liens de démonstration issus des fixtures Doctrine de - date-poll-api. - - - - -
diff --git a/src/app/core/components/header/header.component.html b/src/app/core/components/header/header.component.html index 41034276..cb97f35a 100644 --- a/src/app/core/components/header/header.component.html +++ b/src/app/core/components/header/header.component.html @@ -46,4 +46,32 @@ menu mobile +
+ Environnement de développement: voici des liens de démonstration issus des fixtures Doctrine de date-poll-api. + + + + +
diff --git a/src/app/features/old-stuff/config/DateUtilities.ts b/src/app/core/services/DateUtilities.ts similarity index 100% rename from src/app/features/old-stuff/config/DateUtilities.ts rename to src/app/core/services/DateUtilities.ts diff --git a/src/app/features/old-stuff/config/PollUtilities.ts b/src/app/core/services/PollUtilities.ts similarity index 94% rename from src/app/features/old-stuff/config/PollUtilities.ts rename to src/app/core/services/PollUtilities.ts index 30db26cf..9e710b9e 100644 --- a/src/app/features/old-stuff/config/PollUtilities.ts +++ b/src/app/core/services/PollUtilities.ts @@ -1,7 +1,6 @@ import { HttpHeaders } from '@angular/common/http'; -import { PollConfig } from './PollConfig'; import { Injectable } from '@angular/core'; -import { Poll } from '../../../core/models/poll.model'; +import { Poll } from '../models/poll.model'; @Injectable({ providedIn: 'root', diff --git a/src/app/features/administration/form/date-select/date-select.component.ts b/src/app/features/administration/form/date-select/date-select.component.ts index 2208051f..e06eecdc 100644 --- a/src/app/features/administration/form/date-select/date-select.component.ts +++ b/src/app/features/administration/form/date-select/date-select.component.ts @@ -3,11 +3,16 @@ 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 '../../../old-stuff/config/DateUtilities'; +import { DateUtilities } from '../../../../core/services/DateUtilities'; import { ApiService } from '../../../../core/services/api.service'; import { Router } from '@angular/router'; import { DOCUMENT } from '@angular/common'; -import { DateChoice, moreTimeOfDay, otherDefaultDates, TimeSlices } from '../../../old-stuff/config/defaultConfigs'; +import { + DateChoice, + moreTimeOfDay, + otherDefaultDates, + TimeSlices, +} from '../../../../../../mocks/old-stuff/config/defaultConfigs'; import { CdkDragDrop, moveItemInArray, transferArrayItem } from '@angular/cdk/drag-drop'; import { TranslateService } from '@ngx-translate/core'; diff --git a/src/app/features/consultation/consultation-routing.module.ts b/src/app/features/consultation/consultation-routing.module.ts index e09b8d72..36484ca2 100644 --- a/src/app/features/consultation/consultation-routing.module.ts +++ b/src/app/features/consultation/consultation-routing.module.ts @@ -5,7 +5,7 @@ import { ConsultationComponent } from './consultation.component'; const routes: Routes = [ { - path: '/', + path: '', component: ConsultationComponent, children: [{ path: '/:hash', component: ConsultationComponent }], }, diff --git a/src/app/features/consultation/consultation.component.ts b/src/app/features/consultation/consultation.component.ts index ff7fefdd..7a495ecf 100644 --- a/src/app/features/consultation/consultation.component.ts +++ b/src/app/features/consultation/consultation.component.ts @@ -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 '../old-stuff/config/PollUtilities'; +import { PollUtilities } from '../../core/services/PollUtilities'; import { Comment } from '../../core/models/comment.model'; import { StorageService } from '../../core/services/storage.service'; import { ApiService } from '../../core/services/api.service'; diff --git a/src/app/features/old-stuff/pages/poll/poll-display/poll-display.component.scss b/src/app/features/old-stuff/pages/poll/poll-display/poll-display.component.scss deleted file mode 100644 index 5ab410dc..00000000 --- a/src/app/features/old-stuff/pages/poll/poll-display/poll-display.component.scss +++ /dev/null @@ -1 +0,0 @@ -@import '../../../../../../styles/variables'; diff --git a/src/app/routes-framadate.ts b/src/app/routes-framadate.ts index 3b18424f..64e14374 100644 --- a/src/app/routes-framadate.ts +++ b/src/app/routes-framadate.ts @@ -37,10 +37,6 @@ export const routes: Routes = [ loadChildren: () => import('./features/participation/participation.module').then((m) => m.ParticipationModule), // resolve: { poll: PollService }, }, - { - path: 'oldstuff', - loadChildren: () => import('./features/old-stuff/old-stuff.module').then((m) => m.OldStuffModule), - }, { path: 'success', component: SuccessComponent, From b9181b5b3fe6b7163ffefbb0bea3e70a186bee53 Mon Sep 17 00:00:00 2001 From: Tykayn Date: Thu, 29 Apr 2021 10:45:22 +0200 Subject: [PATCH 03/18] rename utils services --- mocks/old-stuff/pages/admin/admin.component.ts | 4 ++-- mocks/old-stuff/pages/dates/dates.component.ts | 4 ++-- mocks/old-stuff/pages/visibility/visibility.component.ts | 4 ++-- mocks/old-stuff/services/config.service.ts | 4 ++-- .../services/{DateUtilities.ts => date.utilities.service.ts} | 2 +- .../services/{PollUtilities.ts => poll.utilities.service.ts} | 2 +- .../administration/form/date-select/date-select.component.ts | 4 ++-- src/app/features/consultation/consultation.component.ts | 4 ++-- 8 files changed, 14 insertions(+), 14 deletions(-) rename src/app/core/services/{DateUtilities.ts => date.utilities.service.ts} (97%) rename src/app/core/services/{PollUtilities.ts => poll.utilities.service.ts} (98%) diff --git a/mocks/old-stuff/pages/admin/admin.component.ts b/mocks/old-stuff/pages/admin/admin.component.ts index ba67f433..cb56c601 100644 --- a/mocks/old-stuff/pages/admin/admin.component.ts +++ b/mocks/old-stuff/pages/admin/admin.component.ts @@ -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 ) {} diff --git a/mocks/old-stuff/pages/dates/dates.component.ts b/mocks/old-stuff/pages/dates/dates.component.ts index f78a93d9..ce9d8046 100644 --- a/mocks/old-stuff/pages/dates/dates.component.ts +++ b/mocks/old-stuff/pages/dates/dates.component.ts @@ -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); diff --git a/mocks/old-stuff/pages/visibility/visibility.component.ts b/mocks/old-stuff/pages/visibility/visibility.component.ts index 63f581f4..6d18a1fd 100644 --- a/mocks/old-stuff/pages/visibility/visibility.component.ts +++ b/mocks/old-stuff/pages/visibility/visibility.component.ts @@ -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); } diff --git a/mocks/old-stuff/services/config.service.ts b/mocks/old-stuff/services/config.service.ts index 9e1d6434..d24f085e 100644 --- a/mocks/old-stuff/services/config.service.ts +++ b/mocks/old-stuff/services/config.service.ts @@ -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(); diff --git a/src/app/core/services/DateUtilities.ts b/src/app/core/services/date.utilities.service.ts similarity index 97% rename from src/app/core/services/DateUtilities.ts rename to src/app/core/services/date.utilities.service.ts index 58cc0b2a..e33e01f2 100644 --- a/src/app/core/services/DateUtilities.ts +++ b/src/app/core/services/date.utilities.service.ts @@ -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 diff --git a/src/app/core/services/PollUtilities.ts b/src/app/core/services/poll.utilities.service.ts similarity index 98% rename from src/app/core/services/PollUtilities.ts rename to src/app/core/services/poll.utilities.service.ts index 9e710b9e..e252ac91 100644 --- a/src/app/core/services/PollUtilities.ts +++ b/src/app/core/services/poll.utilities.service.ts @@ -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 diff --git a/src/app/features/administration/form/date-select/date-select.component.ts b/src/app/features/administration/form/date-select/date-select.component.ts index e06eecdc..227e8839 100644 --- a/src/app/features/administration/form/date-select/date-select.component.ts +++ b/src/app/features/administration/form/date-select/date-select.component.ts @@ -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, diff --git a/src/app/features/consultation/consultation.component.ts b/src/app/features/consultation/consultation.component.ts index 7a495ecf..d738cc28 100644 --- a/src/app/features/consultation/consultation.component.ts +++ b/src/app/features/consultation/consultation.component.ts @@ -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, From 3a89645e66b9445e61bf67c50805b9682a538931 Mon Sep 17 00:00:00 2001 From: Tykayn Date: Thu, 29 Apr 2021 10:56:36 +0200 Subject: [PATCH 04/18] auto send vote in dev mode --- .../core/services/poll.utilities.service.ts | 80 ++++++++++++++++- .../consultation/consultation.component.ts | 87 +++---------------- 2 files changed, 87 insertions(+), 80 deletions(-) diff --git a/src/app/core/services/poll.utilities.service.ts b/src/app/core/services/poll.utilities.service.ts index e252ac91..3514cde9 100644 --- a/src/app/core/services/poll.utilities.service.ts +++ b/src/app/core/services/poll.utilities.service.ts @@ -1,6 +1,7 @@ import { HttpHeaders } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { Poll } from '../models/poll.model'; +import { Comment } from '../models/comment.model'; @Injectable({ providedIn: 'root', @@ -67,11 +68,84 @@ export class PollUtilitiesService { 'Access-Control-Allow-Origin': '*', }; - const requestOptions = { - headers: new HttpHeaders(headerDict), + return { + headers: headerDict, body: bodyContent, }; + } - return requestOptions; + exportCSV(poll: Poll): void { + let rows = []; + const now = new Date(); + const headers = [ + ['export de sondage Framadate ', poll.custom_url], + ['le', now.toISOString()], + [poll.id, poll.title, poll.custom_url, poll.creation_date], + ['pseudo'], + ]; + + const listOfChoices = ['choices : ']; + poll.choices.map((choice) => { + listOfChoices.push(choice.name); + }); + listOfChoices.push('pseudo'); + + poll.stacks.map((voteStack) => { + const voteStackInArray = [voteStack.pseudo]; + const keysVotes = Object.keys(voteStack.votes); + + keysVotes.map((id) => { + voteStackInArray.push(voteStack.votes[id].value ? voteStack.votes[id].value : ''); + }); + rows.push(voteStackInArray); + }); + const headersComments = [['comments'], ['pseudo', 'text', 'creation_date']]; + const comments = []; + poll.comments.map((item: Comment) => { + comments.push([item.pseudo, item.text, new Date(item.created_at), '\n']); + }); + headers.push(listOfChoices); + rows = [headers, listOfChoices, rows, headersComments, comments]; + + const convertedCsv = rows + .map((elem) => { + console.log('elem', elem); + return elem + .map((item) => { + console.log('item', item); + if (typeof item === typeof Array) { + return item.join('\n'); + } + return item; + }) + .join('\n'); + }) + .join('\n'); + console.log('rows', rows); + console.log('convertedCsv', convertedCsv); + + const csvContent = 'data:text/csv;charset=utf-8,' + convertedCsv; + console.log('csvContent', csvContent); + const encodedUri = encodeURI(csvContent); + const link = document.createElement('a'); + link.setAttribute('href', encodedUri); + const exportFileName = + (poll.urlPublic ? poll.urlPublic : this.makeSlug(poll)) + '_export_' + new Date() + '.csv'; + link.setAttribute('download', exportFileName); + document.body.appendChild(link); // Required for FF + link.click(); // This will download the data file named "my_data.csv". + } + + download(filename: string, text: string): void { + const element = document.createElement('a'); + element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); + element.setAttribute('download', filename); + + element.style.display = 'none'; + document.body.appendChild(element); + + element.click(); + + document.body.removeChild(element); } } diff --git a/src/app/features/consultation/consultation.component.ts b/src/app/features/consultation/consultation.component.ts index d738cc28..132a061a 100644 --- a/src/app/features/consultation/consultation.component.ts +++ b/src/app/features/consultation/consultation.component.ts @@ -10,6 +10,7 @@ import { Comment } from '../../core/models/comment.model'; import { StorageService } from '../../core/services/storage.service'; import { ApiService } from '../../core/services/api.service'; import { Stack } from '../../core/models/stack.model'; +import { environment } from '../../../environments/environment'; @Component({ selector: 'app-consultation', @@ -50,6 +51,10 @@ export class ConsultationComponent implements OnInit, OnDestroy { if (newpoll) { this.isArchived = new Date(newpoll.expiracy_date) < new Date(); this.poll.is_archived = this.isArchived; + + if (!environment.production) { + this.addVoteStack(); + } } }); @@ -83,7 +88,9 @@ export class ConsultationComponent implements OnInit, OnDestroy { this.api.sendVoteStackOfPoll(this.poll, this.storageService.vote_stack).subscribe((resp) => { console.log('resp', resp); - this.api.getPollBySlug(this.poll.custom_url); + if (resp) { + this.api.getPollBySlug(this.poll.custom_url); + } }); } @@ -91,85 +98,11 @@ export class ConsultationComponent implements OnInit, OnDestroy { * export all the poll data available to the public as a CSV single file */ exportCSV() { - let rows = []; - const now = new Date(); - const headers = [ - ['export de sondage Framadate ', this.poll.custom_url], - ['le', now.toISOString()], - [this.poll.id, this.poll.title, this.poll.custom_url, this.poll.creation_date], - ['pseudo'], - ]; - - const listOfChoices = ['choices : ']; - this.poll.choices.map((choice) => { - listOfChoices.push(choice.name); - }); - listOfChoices.push('pseudo'); - - this.poll.stacks.map((voteStack) => { - const voteStackInArray = [voteStack.pseudo]; - const keysVotes = Object.keys(voteStack.votes); - - keysVotes.map((id) => { - voteStackInArray.push(voteStack.votes[id].value ? voteStack.votes[id].value : ''); - }); - rows.push(voteStackInArray); - }); - const headersComments = [['comments'], ['pseudo', 'text', 'creation_date']]; - const comments = []; - this.poll.comments.map((item: Comment) => { - comments.push([item.pseudo, item.text, new Date(item.created_at), '\n']); - }); - headers.push(listOfChoices); - rows = [headers, listOfChoices, rows, headersComments, comments]; - - const convertedCsv = rows - .map((elem) => { - console.log('elem', elem); - return elem - .map((item) => { - console.log('item', item); - if (typeof item === typeof Array) { - return item.join('\n'); - } - return item; - }) - .join('\n'); - }) - .join('\n'); - console.log('rows', rows); - console.log('convertedCsv', convertedCsv); - - const csvContent = 'data:text/csv;charset=utf-8,' + convertedCsv; - console.log('csvContent', csvContent); - const encodedUri = encodeURI(csvContent); - const link = document.createElement('a'); - link.setAttribute('href', encodedUri); - const exportFileName = - (this.poll.urlPublic ? this.poll.urlPublic : this.utils.makeSlug(this.poll)) + - '_export_' + - new Date() + - '.csv'; - link.setAttribute('download', exportFileName); - document.body.appendChild(link); // Required for FF - link.click(); // This will download the data file named "my_data.csv". + this.utils.exportCSV(this.poll); } exportJson() { - this.download('export_poll_' + this.pollSlug + '.json', JSON.stringify(this.poll)); - } - - download(filename, text) { - const element = document.createElement('a'); - element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); - element.setAttribute('download', filename); - - element.style.display = 'none'; - document.body.appendChild(element); - - element.click(); - - document.body.removeChild(element); + this.utils.download('export_poll_' + this.pollSlug + '.json', JSON.stringify(this.poll)); } duplicate() { From 31f0f19a9ae2120ac3394414e79649a44ee2de14 Mon Sep 17 00:00:00 2001 From: Tykayn Date: Thu, 29 Apr 2021 12:49:23 +0200 Subject: [PATCH 05/18] manage mobile menu, and add poll title to page title --- src/app/app.component.html | 2 +- .../components/header/header.component.html | 5 +- .../components/header/header.component.ts | 6 +- .../navigation/navigation.component.html | 88 ++++++++++--------- .../navigation/navigation.component.ts | 5 +- src/app/core/services/poll.service.ts | 4 + .../consultation/consultation.component.ts | 5 +- .../feedback/feedback.component.scss | 2 +- src/environments/environment.prod.ts | 3 +- src/environments/environment.ts | 3 +- 10 files changed, 71 insertions(+), 52 deletions(-) diff --git a/src/app/app.component.html b/src/app/app.component.html index ce833dc8..8f398fd4 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,6 +1,6 @@ - + diff --git a/src/app/core/components/header/header.component.html b/src/app/core/components/header/header.component.html index cb97f35a..74d20d14 100644 --- a/src/app/core/components/header/header.component.html +++ b/src/app/core/components/header/header.component.html @@ -43,10 +43,11 @@
- menu mobile + +
-
+
Environnement de développement: voici des liens de démonstration issus des fixtures Doctrine de date-poll-api.

- - + Accueil From 69f8eac147f413a1f7bbb9c2d2b12b6526e63419 Mon Sep 17 00:00:00 2001 From: Tykayn Date: Thu, 29 Apr 2021 16:12:56 +0200 Subject: [PATCH 07/18] nav items for demos in mobile menu --- .../components/header/header.component.html | 59 +++++---- .../components/header/header.component.ts | 2 +- .../navigation/navigation.component.html | 124 ++++++++---------- .../navigation/navigation.component.scss | 4 + 4 files changed, 97 insertions(+), 92 deletions(-) diff --git a/src/app/core/components/header/header.component.html b/src/app/core/components/header/header.component.html index 74d20d14..24188ab8 100644 --- a/src/app/core/components/header/header.component.html +++ b/src/app/core/components/header/header.component.html @@ -49,30 +49,41 @@
Environnement de développement: voici des liens de démonstration issus des fixtures Doctrine de date-poll-api. - - - - + + + citron + + + pass + +
+ diff --git a/src/app/core/components/header/header.component.ts b/src/app/core/components/header/header.component.ts index c0854c11..f2b56dd6 100644 --- a/src/app/core/components/header/header.component.ts +++ b/src/app/core/components/header/header.component.ts @@ -17,7 +17,7 @@ export class HeaderComponent implements OnInit { public env = environment; @Input() public appTitle = environment.appTitle; @Input() public appLogo = environment.appLogo; - mobileMenuVisible = true; + mobileMenuVisible = false; constructor(private userService: UserService) {} diff --git a/src/app/core/components/sibebar/navigation/navigation.component.html b/src/app/core/components/sibebar/navigation/navigation.component.html index 98404d74..2ee6ea2d 100644 --- a/src/app/core/components/sibebar/navigation/navigation.component.html +++ b/src/app/core/components/sibebar/navigation/navigation.component.html @@ -1,70 +1,60 @@ -