From e0d0dc0754d9820a6a2a9e5cc6aa197e5630a328 Mon Sep 17 00:00:00 2001 From: Luc Wollants Date: Tue, 21 Nov 2023 09:46:53 +0100 Subject: [PATCH 01/19] Add Docker file for Ubuntu with Node --- docker/node/Dockerfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 docker/node/Dockerfile diff --git a/docker/node/Dockerfile b/docker/node/Dockerfile new file mode 100644 index 0000000..39177d8 --- /dev/null +++ b/docker/node/Dockerfile @@ -0,0 +1,17 @@ +FROM ubuntu:20.04 + +RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl gnupg vim libffi-dev git + +RUN mkdir -p /etc/apt/keyrings + +RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg + +RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list + +RUN apt-get update && apt-get install -y --no-install-recommends nodejs + +RUN npm install -g @angular/cli + +RUN npm i + +ENTRYPOINT ["tail", "-f", "/dev/null"] From b11fa28c9e4e18fb06370e6a0e2296aeb40b370d Mon Sep 17 00:00:00 2001 From: Luc Wollants Date: Tue, 21 Nov 2023 09:47:19 +0100 Subject: [PATCH 02/19] Add start command for Docker on host 0.0.0.0 --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index d456a13..9b096e6 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "scripts": { "ng": "ng", "start": "ng serve", + "start:docker": "ng serve --host 0.0.0.0 --disable-host-check", "build": "ng build", "types:check": "tsc --noEmit", "format": "prettier . --write --ignore-path .gitignore", From b6fb65ca031c8ea394f30a0e39770899b7dd21b2 Mon Sep 17 00:00:00 2001 From: Luc Wollants Date: Tue, 21 Nov 2023 09:47:40 +0100 Subject: [PATCH 03/19] Add docker-compose file --- docker-compose.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..c50fca4 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,19 @@ +version: "3.5" + +services: + + node: + build: docker/node + hostname: 'widget-beheer.local' + volumes: + - .:/var/www/html:cached + working_dir: /var/www/html + container_name: node.widgetbeheer + ports: + - '4200:4200' + networks: + - widgetbeheer + +networks: + widgetbeheer: + driver: bridge From a5b0e4006e1ac16153db5b2958d0a7d45730e2d4 Mon Sep 17 00:00:00 2001 From: Luc Wollants Date: Tue, 21 Nov 2023 09:47:52 +0100 Subject: [PATCH 04/19] Add Makefile --- Makefile | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e84252c --- /dev/null +++ b/Makefile @@ -0,0 +1,13 @@ +.PHONY: up down bash + +up: + docker-compose up -d + +down: + docker-compose down + +bash: + docker-compose exec node bash + +serve: + docker-compose exec -d node npm run start:docker From f109a0b951725a9cfadb128be4d8c87897819c67 Mon Sep 17 00:00:00 2001 From: Luc Wollants Date: Tue, 21 Nov 2023 09:51:47 +0100 Subject: [PATCH 05/19] Added Jira link to GitHub pull request template --- .github/pull_request_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 9e993f0..d95af8e 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -8,4 +8,4 @@ --- -Ticket: +Ticket: https://jira.publiq.be/browse/ From 52a59e0813f775f2150b8bbd86be2868d18ac459 Mon Sep 17 00:00:00 2001 From: Luc Wollants Date: Tue, 21 Nov 2023 10:00:20 +0100 Subject: [PATCH 06/19] Linting --- docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index c50fca4..6f15d11 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,6 @@ version: "3.5" services: - node: build: docker/node hostname: 'widget-beheer.local' From f3073331e9c84937f95c058974e00a6dce4ed2bd Mon Sep 17 00:00:00 2001 From: Luc Wollants Date: Tue, 21 Nov 2023 10:04:27 +0100 Subject: [PATCH 07/19] Ignore docker-compose.yml file for Prettier --- .prettierignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .prettierignore diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..1120be9 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +docker-compose.yml From 4ae708d1cf237e72ef8fc794ed0a54c4f76a7729 Mon Sep 17 00:00:00 2001 From: Luc Wollants Date: Tue, 21 Nov 2023 10:09:44 +0100 Subject: [PATCH 08/19] Linting --- .prettierignore | 1 - docker-compose.yml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 .prettierignore diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 1120be9..0000000 --- a/.prettierignore +++ /dev/null @@ -1 +0,0 @@ -docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml index 6f15d11..78ed5f6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: "3.5" +version: '3.5' services: node: From 4c78d454666048b4d2a7c528af98bc7a6d6ff31f Mon Sep 17 00:00:00 2001 From: JonasVHG <4658984+JonasVHG@users.noreply.github.com> Date: Wed, 22 Nov 2023 09:35:35 +0100 Subject: [PATCH 09/19] Move npm -i out of Dockerfile & into Makefile --- Makefile | 5 ++++- docker/node/Dockerfile | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index e84252c..f5a1afd 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: up down bash +.PHONY: up down bash install serve up: docker-compose up -d @@ -9,5 +9,8 @@ down: bash: docker-compose exec node bash +install: + docker-compose exec -d node npm i --force + serve: docker-compose exec -d node npm run start:docker diff --git a/docker/node/Dockerfile b/docker/node/Dockerfile index 39177d8..3b2efb1 100644 --- a/docker/node/Dockerfile +++ b/docker/node/Dockerfile @@ -12,6 +12,4 @@ RUN apt-get update && apt-get install -y --no-install-recommends nodejs RUN npm install -g @angular/cli -RUN npm i - ENTRYPOINT ["tail", "-f", "/dev/null"] From 99c8e1d9b8ef9d11660cc49ca28b1d241698bf3a Mon Sep 17 00:00:00 2001 From: JonasVHG <4658984+JonasVHG@users.noreply.github.com> Date: Wed, 29 Nov 2023 14:43:02 +0100 Subject: [PATCH 10/19] update config --- src/assets/config.json | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/assets/config.json b/src/assets/config.json index c56efd8..b1095b9 100644 --- a/src/assets/config.json +++ b/src/assets/config.json @@ -1,10 +1,12 @@ { "production": true, - "apiUrl": "https://projectaanvraag-api.uitdatabank.dev/", + "apiUrl": "http://host.docker.internal/", "widgetApi_currentVersion": "3", - "widgetApi_embedUrl_current": "https://projectaanvraag-api.uitdatabank.dev/widgets/layout/:page_id.js", - "widgetApi_embedUrl_forceCurrent": "https://projectaanvraag-api.uitdatabank.dev/widgets/layout/v3/:page_id.js", - "projectaanvraagDashboardUrl": "https://projectaanvraag.uitdatabank.dev/", + "widgetApi_embedUrl_current": "http://host.docker.internal/widgets/layout/:page_id.js", + "widgetApi_embedUrl_forceCurrent": "http://host.docker.internal/widgets/layout/v3/:page_id.js", + "projectaanvraagDashboardUrl": "http://host.docker.internal:9999", + "platformUrl": "http://localhost:81/admin", "zendeskUrl": "https://www.zendesk.com", - "publishers": "BRUZZ,Gazet van Antwerpen,Indiestyle,UiTX,UiT,UiTMetVlieg,NXTPOP" + "publishers": "BRUZZ,Gazet van Antwerpen,Indiestyle,UiTX,UiT,UiTMetVlieg,NXTPOP", + "platformIsLive": true } From 4c7f567adc86e76a01684afa2ae2520682ae80d5 Mon Sep 17 00:00:00 2001 From: JonasVHG <4658984+JonasVHG@users.noreply.github.com> Date: Wed, 29 Nov 2023 14:43:13 +0100 Subject: [PATCH 11/19] Add new values to environment --- src/environments/environment.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 6950587..6c57a50 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -15,8 +15,10 @@ type Environment = { widgetApi_embedUrl_current: string; widgetApi_embedUrl_forceCurrent: string; projectaanvraagDashboardUrl: string; + platformUrl: string; zendeskUrl: string; publishers: string; + platformIsLive: boolean; }; export let environment: Environment; @@ -31,7 +33,9 @@ export const setEnvironmentToConfig = async () => { widgetApi_embedUrl_current: config.widgetApi_embedUrl_current, widgetApi_embedUrl_forceCurrent: config.widgetApi_embedUrl_forceCurrent, projectaanvraagDashboardUrl: config.projectaanvraagDashboardUrl, + platformUrl: config.platformUrl, zendeskUrl: config.zendeskUrl, publishers: config.publishers, + platformIsLive: config.platformIsLive, }; }; From 58ef77fb22dbc0271f8207b081185c62ebacd36d Mon Sep 17 00:00:00 2001 From: JonasVHG <4658984+JonasVHG@users.noreply.github.com> Date: Wed, 29 Nov 2023 14:45:48 +0100 Subject: [PATCH 12/19] Add translation --- src/assets/i18n/nl.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/assets/i18n/nl.json b/src/assets/i18n/nl.json index 77ed8f3..15004e2 100644 --- a/src/assets/i18n/nl.json +++ b/src/assets/i18n/nl.json @@ -267,6 +267,7 @@ "BUTTON_COPY_TO_CLIPBOARD": "Scripttag kopiëren", "BUTTON_COPY_TO_CLIPBOARD_TITLE": "Kopiëren", "BUTTON_COPY_TO_CLIPBOARD_SUCCESS": "Scripttag gekopieerd", + "TOPBAR_BACK_BUTTON_LABEL_INTEGRATIES": "Integraties", "BUTTON_BACK_TO_PROJECTAANVRAAG_DASHBOARD": "Projectaanvragen", "WIDGET_PAGE_LIST_NO_PAGES_FOUND": "Geen widgets gevonden. Klik op \"Nieuwe widget maken\" om van start te gaan.", "TITLE_WIDGET_PAGE_LEGACY_WIDGETS_LIST": "Widgets aangemaakt vòòr 2018", From 92b9addd9a88232aa59d7140b2b1bc6104f93bdc Mon Sep 17 00:00:00 2001 From: JonasVHG <4658984+JonasVHG@users.noreply.github.com> Date: Wed, 29 Nov 2023 14:46:19 +0100 Subject: [PATCH 13/19] update name & redirect of BackButton depending on platformIsLive --- .../components/page-list/page-list.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/widget-builder/components/page-list/page-list.component.ts b/src/app/widget-builder/components/page-list/page-list.component.ts index 782a9b9..d90621a 100644 --- a/src/app/widget-builder/components/page-list/page-list.component.ts +++ b/src/app/widget-builder/components/page-list/page-list.component.ts @@ -319,8 +319,8 @@ export class PageListComponent implements OnInit { this.topbarService.setBackButton( new BackButton( BackButton.TYPE_LINK, - 'TOPBAR_BACK_BUTTON_LABEL_PROJECTAANVRAGEN', - environment.projectaanvraagDashboardUrl + environment.platformIsLive ? 'TOPBAR_BACK_BUTTON_LABEL_INTEGRATIES' : 'TOPBAR_BACK_BUTTON_LABEL_PROJECTAANVRAGEN', + environment.platformIsLive ? environment.platformUrl : environment.projectaanvraagDashboardUrl ) ); } From aff2e684653b830159f3f1a62931638c5657cf15 Mon Sep 17 00:00:00 2001 From: JonasVHG <4658984+JonasVHG@users.noreply.github.com> Date: Wed, 29 Nov 2023 14:51:33 +0100 Subject: [PATCH 14/19] linting --- .../components/page-list/page-list.component.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/widget-builder/components/page-list/page-list.component.ts b/src/app/widget-builder/components/page-list/page-list.component.ts index d90621a..3b55a3c 100644 --- a/src/app/widget-builder/components/page-list/page-list.component.ts +++ b/src/app/widget-builder/components/page-list/page-list.component.ts @@ -319,8 +319,12 @@ export class PageListComponent implements OnInit { this.topbarService.setBackButton( new BackButton( BackButton.TYPE_LINK, - environment.platformIsLive ? 'TOPBAR_BACK_BUTTON_LABEL_INTEGRATIES' : 'TOPBAR_BACK_BUTTON_LABEL_PROJECTAANVRAGEN', - environment.platformIsLive ? environment.platformUrl : environment.projectaanvraagDashboardUrl + environment.platformIsLive + ? 'TOPBAR_BACK_BUTTON_LABEL_INTEGRATIES' + : 'TOPBAR_BACK_BUTTON_LABEL_PROJECTAANVRAGEN', + environment.platformIsLive + ? environment.platformUrl + : environment.projectaanvraagDashboardUrl ) ); } From 339dddbb12b234d3a5a8535d7e46b70523c8bb73 Mon Sep 17 00:00:00 2001 From: Luc Wollants Date: Mon, 11 Dec 2023 14:40:49 +0100 Subject: [PATCH 15/19] Consistent naming `publiq platform` --- .../widget-builder/components/page-list/page-list.component.ts | 2 +- src/assets/i18n/nl.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/widget-builder/components/page-list/page-list.component.ts b/src/app/widget-builder/components/page-list/page-list.component.ts index 3b55a3c..0aa7e7f 100644 --- a/src/app/widget-builder/components/page-list/page-list.component.ts +++ b/src/app/widget-builder/components/page-list/page-list.component.ts @@ -320,7 +320,7 @@ export class PageListComponent implements OnInit { new BackButton( BackButton.TYPE_LINK, environment.platformIsLive - ? 'TOPBAR_BACK_BUTTON_LABEL_INTEGRATIES' + ? 'TOPBAR_BACK_BUTTON_LABEL_PUBLIQ_PLATFORM' : 'TOPBAR_BACK_BUTTON_LABEL_PROJECTAANVRAGEN', environment.platformIsLive ? environment.platformUrl diff --git a/src/assets/i18n/nl.json b/src/assets/i18n/nl.json index 15004e2..465930c 100644 --- a/src/assets/i18n/nl.json +++ b/src/assets/i18n/nl.json @@ -267,7 +267,6 @@ "BUTTON_COPY_TO_CLIPBOARD": "Scripttag kopiëren", "BUTTON_COPY_TO_CLIPBOARD_TITLE": "Kopiëren", "BUTTON_COPY_TO_CLIPBOARD_SUCCESS": "Scripttag gekopieerd", - "TOPBAR_BACK_BUTTON_LABEL_INTEGRATIES": "Integraties", "BUTTON_BACK_TO_PROJECTAANVRAAG_DASHBOARD": "Projectaanvragen", "WIDGET_PAGE_LIST_NO_PAGES_FOUND": "Geen widgets gevonden. Klik op \"Nieuwe widget maken\" om van start te gaan.", "TITLE_WIDGET_PAGE_LEGACY_WIDGETS_LIST": "Widgets aangemaakt vòòr 2018", @@ -276,6 +275,7 @@ "TITLE_WIDGET_PAGE_LIST_NEW_VERSION": "Nieuwe versie", "LOGOUT_FAILED_NOTIFICATION": "Afmelden niet gelukt. Probeer het later opnieuw.", "TOPBAR_USER_MENU_BUTTON_LOGOUT": "Afmelden", + "TOPBAR_BACK_BUTTON_LABEL_PUBLIQ_PLATFORM": "publiq platform", "TOPBAR_BACK_BUTTON_LABEL_PROJECTAANVRAGEN": "Projectaanvragen", "TOPBAR_PUBLISH_BUTTON": "Publiceren", "TOPBAR_STYLES_BUTTON": "Stijlen", From d79053409a1e4187a24a8f6f536aced06c6270d6 Mon Sep 17 00:00:00 2001 From: Luc Wollants Date: Mon, 11 Dec 2023 14:41:09 +0100 Subject: [PATCH 16/19] Redirect to integrations page for normal users --- src/assets/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assets/config.json b/src/assets/config.json index b1095b9..3f2608b 100644 --- a/src/assets/config.json +++ b/src/assets/config.json @@ -5,7 +5,7 @@ "widgetApi_embedUrl_current": "http://host.docker.internal/widgets/layout/:page_id.js", "widgetApi_embedUrl_forceCurrent": "http://host.docker.internal/widgets/layout/v3/:page_id.js", "projectaanvraagDashboardUrl": "http://host.docker.internal:9999", - "platformUrl": "http://localhost:81/admin", + "platformUrl": "http://localhost:81/nl/integraties", "zendeskUrl": "https://www.zendesk.com", "publishers": "BRUZZ,Gazet van Antwerpen,Indiestyle,UiTX,UiT,UiTMetVlieg,NXTPOP", "platformIsLive": true From 6178f116ccd73a39a934abdb9f0698857db04799 Mon Sep 17 00:00:00 2001 From: Bram Pauwelyn Date: Mon, 27 May 2024 11:36:15 +0200 Subject: [PATCH 17/19] PPF-198 - Add instructions for docker setup --- Makefile | 2 -- README.md | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f5a1afd..9740a34 100644 --- a/Makefile +++ b/Makefile @@ -12,5 +12,3 @@ bash: install: docker-compose exec -d node npm i --force -serve: - docker-compose exec -d node npm run start:docker diff --git a/README.md b/README.md index ea4f8eb..a5899ae 100644 --- a/README.md +++ b/README.md @@ -17,3 +17,19 @@ Run `ng build` to build the project. The build artifacts will be stored in the ` ## Further help To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). + + + +# Docker setup + +Start docker container +`make up` + +Install dependencies +`make install` + +Bash in the container +`make bash` + +Serve widgetbeheer +`npm run start:docker` \ No newline at end of file From 8f3b8e68dfea192bffdd6a86107671414de2a261 Mon Sep 17 00:00:00 2001 From: JonasVHG <4658984+JonasVHG@users.noreply.github.com> Date: Mon, 4 Nov 2024 10:19:24 +0100 Subject: [PATCH 18/19] merge master --- .../page-list/page-list.component.ts | 268 +++++++++--------- 1 file changed, 132 insertions(+), 136 deletions(-) diff --git a/src/app/widget-builder/components/page-list/page-list.component.ts b/src/app/widget-builder/components/page-list/page-list.component.ts index 0aa7e7f..fc40e4d 100644 --- a/src/app/widget-builder/components/page-list/page-list.component.ts +++ b/src/app/widget-builder/components/page-list/page-list.component.ts @@ -54,13 +54,13 @@ export class PageListComponent implements OnInit { * @param topbarService */ constructor( - private widgetService: WidgetService, - private modalService: NgbModal, - private toastyService: ToastyService, - private route: ActivatedRoute, - private router: Router, - private translateService: TranslateService, - private topbarService: TopbarService + private widgetService: WidgetService, + private modalService: NgbModal, + private toastyService: ToastyService, + private route: ActivatedRoute, + private router: Router, + private translateService: TranslateService, + private topbarService: TopbarService ) {} /** @@ -68,12 +68,12 @@ export class PageListComponent implements OnInit { */ ngOnInit() { this.route.data.subscribe( - (data: { widgetPages: Array; project: Project }) => { - this.buildWidgetPageList(data.widgetPages); + (data: { widgetPages: Array; project: Project }) => { + this.buildWidgetPageList(data.widgetPages); - // Get the project from the current route - this.project = data.project; - } + // Get the project from the current route + this.project = data.project; + } ); // Init the topbar @@ -91,37 +91,37 @@ export class PageListComponent implements OnInit { // Remove the widgetPage id clone.id = ''; clone.title = - clone.title + - ' (' + - (this.translateService - .instant('DUPLICATE_WIDGET_PAGE_COPY') - .toString() as string) + - ')'; + clone.title + + ' (' + + (this.translateService + .instant('DUPLICATE_WIDGET_PAGE_COPY') + .toString() as string) + + ')'; // Save the widget page and redirect this.widgetService - .saveWidgetPage(clone) - .toPromise() - .then( - async (widgetSaveResponse) => { - if (widgetSaveResponse.widgetPage) { - await this.router.navigate([ - '/project', - this.project.id, - 'page', - widgetSaveResponse.widgetPage.id, - 'edit', - ]); - } - }, - () => { - this.toastyService.error( - this.translateService.instant( - 'DUPLICATE_WIDGET_PAGE_FAILED_NOTIFICATION' - ) - ); - } - ); + .saveWidgetPage(clone) + .toPromise() + .then( + async (widgetSaveResponse) => { + if (widgetSaveResponse.widgetPage) { + await this.router.navigate([ + '/project', + this.project.id, + 'page', + widgetSaveResponse.widgetPage.id, + 'edit', + ]); + } + }, + () => { + this.toastyService.error( + this.translateService.instant( + 'DUPLICATE_WIDGET_PAGE_FAILED_NOTIFICATION' + ) + ); + } + ); } /** @@ -136,40 +136,40 @@ export class PageListComponent implements OnInit { modalInstance.message = 'REMOVE_WIDGET_PAGE_MODAL_MESSAGE'; modal.result.then( - (result) => { - this.widgetService.deleteWidgetPage(widgetPage).subscribe( - () => { - // Remove the widget from the corresponding array, so the model gets updated - let widgetPages = this.widgetPages; - if ( - widgetPage.version < Number(environment.widgetApi_currentVersion) - ) { - widgetPages = this.legacyWidgetPages; - } + (result) => { + this.widgetService.deleteWidgetPage(widgetPage).subscribe( + () => { + // Remove the widget from the corresponding array, so the model gets updated + let widgetPages = this.widgetPages; + if ( + widgetPage.version < Number(environment.widgetApi_currentVersion) + ) { + widgetPages = this.legacyWidgetPages; + } - const index = widgetPages.indexOf(widgetPage); - if (index > -1) { - widgetPages.splice(index, 1); - } + const index = widgetPages.indexOf(widgetPage); + if (index > -1) { + widgetPages.splice(index, 1); + } - this.toastyService.success( - this.translateService.instant( - 'REMOVE_WIDGET_PAGE_SUCCESS_NOTIFICATION' - ) - ); - }, - () => { - this.toastyService.error( - this.translateService.instant( - 'REMOVE_WIDGET_PAGE_FAILED_NOTIFICATION' - ) - ); - } - ); - }, - (reason) => { - // Do nothing on modal close - } + this.toastyService.success( + this.translateService.instant( + 'REMOVE_WIDGET_PAGE_SUCCESS_NOTIFICATION' + ) + ); + }, + () => { + this.toastyService.error( + this.translateService.instant( + 'REMOVE_WIDGET_PAGE_FAILED_NOTIFICATION' + ) + ); + } + ); + }, + (reason) => { + // Do nothing on modal close + } ); } @@ -187,16 +187,16 @@ export class PageListComponent implements OnInit { modalInstance.widgetPage = widgetPage; modal.result.then( - (result) => { - if (result) { - this.toastyService.success( - this.translateService.instant( - 'WIDGET_PAGE_ADMIN_MODAL_SUCCESS_NOTIFICATION' - ) - ); - } - }, - () => {} + (result) => { + if (result) { + this.toastyService.success( + this.translateService.instant( + 'WIDGET_PAGE_ADMIN_MODAL_SUCCESS_NOTIFICATION' + ) + ); + } + }, + () => {} ); } @@ -214,17 +214,17 @@ export class PageListComponent implements OnInit { modalInstance.widgetPage = widgetPage; modal.result.then( - (result) => { - if (result) { - this.toastyService.success( - `${widgetPage.language} ` + - (this.translateService - .instant('WIDGET_PAGE_LANGUAGE_MODAL_SUCCESS_NOTIFICATION') - .toString() as string) - ); - } - }, - () => {} + (result) => { + if (result) { + this.toastyService.success( + `${widgetPage.language} ` + + (this.translateService + .instant('WIDGET_PAGE_LANGUAGE_MODAL_SUCCESS_NOTIFICATION') + .toString() as string) + ); + } + }, + () => {} ); } @@ -240,29 +240,29 @@ export class PageListComponent implements OnInit { modalInstance.message = 'UPGRADE_WIDGET_PAGE_MODAL_MESSAGE'; modal.result.then( - (result) => { - this.widgetService.upgradeWidgetPage(widgetPage).subscribe( - () => { - this.reloadWidgetPageList(); + (result) => { + this.widgetService.upgradeWidgetPage(widgetPage).subscribe( + () => { + this.reloadWidgetPageList(); - this.toastyService.success( - this.translateService.instant( - 'UPGRADE_WIDGET_PAGE_SUCCESS_NOTIFICATION' - ) - ); - }, - () => { - this.toastyService.error( - this.translateService.instant( - 'UPGRADE_WIDGET_PAGE_FAILED_NOTIFICATION' - ) - ); - } - ); - }, - (reason) => { - // Do nothing on modal close - } + this.toastyService.success( + this.translateService.instant( + 'UPGRADE_WIDGET_PAGE_SUCCESS_NOTIFICATION' + ) + ); + }, + () => { + this.toastyService.error( + this.translateService.instant( + 'UPGRADE_WIDGET_PAGE_FAILED_NOTIFICATION' + ) + ); + } + ); + }, + (reason) => { + // Do nothing on modal close + } ); } @@ -273,14 +273,14 @@ export class PageListComponent implements OnInit { * @param forceCurrentVersion */ public getWidgetPageUrl( - widgetPage: WidgetPage, - tags = false, - forceCurrentVersion = false + widgetPage: WidgetPage, + tags = false, + forceCurrentVersion = false ) { return this.widgetService.getWidgetPageEmbedUrl( - widgetPage, - tags, - forceCurrentVersion + widgetPage, + tags, + forceCurrentVersion ); } @@ -289,12 +289,12 @@ export class PageListComponent implements OnInit { */ private reloadWidgetPageList() { this.widgetService - .getWidgetPages(this.project.id) - .subscribe((widgetPages: Array) => { - this.widgetPages = []; - this.legacyWidgetPages = []; - this.buildWidgetPageList(widgetPages); - }); + .getWidgetPages(this.project.id) + .subscribe((widgetPages: Array) => { + this.widgetPages = []; + this.legacyWidgetPages = []; + this.buildWidgetPageList(widgetPages); + }); } /** @@ -317,15 +317,11 @@ export class PageListComponent implements OnInit { private initTopbar() { // Add a back button this.topbarService.setBackButton( - new BackButton( - BackButton.TYPE_LINK, - environment.platformIsLive - ? 'TOPBAR_BACK_BUTTON_LABEL_PUBLIQ_PLATFORM' - : 'TOPBAR_BACK_BUTTON_LABEL_PROJECTAANVRAGEN', - environment.platformIsLive - ? environment.platformUrl - : environment.projectaanvraagDashboardUrl - ) + new BackButton( + BackButton.TYPE_LINK, + 'TOPBAR_BACK_BUTTON_LABEL_PROJECTAANVRAGEN', + environment.projectaanvraagDashboardUrl + ) ); } } From c1d6a79800698eef1582ae089c79ba4e33386a5a Mon Sep 17 00:00:00 2001 From: JonasVHG <4658984+JonasVHG@users.noreply.github.com> Date: Mon, 4 Nov 2024 10:24:08 +0100 Subject: [PATCH 19/19] merge master --- src/assets/config.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/assets/config.json b/src/assets/config.json index 3f2608b..8a48249 100644 --- a/src/assets/config.json +++ b/src/assets/config.json @@ -7,6 +7,5 @@ "projectaanvraagDashboardUrl": "http://host.docker.internal:9999", "platformUrl": "http://localhost:81/nl/integraties", "zendeskUrl": "https://www.zendesk.com", - "publishers": "BRUZZ,Gazet van Antwerpen,Indiestyle,UiTX,UiT,UiTMetVlieg,NXTPOP", - "platformIsLive": true + "publishers": "BRUZZ,Gazet van Antwerpen,Indiestyle,UiTX,UiT,UiTMetVlieg,NXTPOP" }