diff --git a/.circleci/config.yml b/.circleci/config.yml index b6914d8bb..7e9124dbc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -799,6 +799,7 @@ jobs: command: | curl https://webhook.entitlementcard-test.tuerantuer.org/hooks/install-<< parameters.bundle >>-$EAK_WEBHOOK name: Install package via webhook + - notify notify_release: docker: - image: cimg/node:19.1.0 @@ -1017,6 +1018,9 @@ parameters: run_deliver_production_backend_administration: default: false type: boolean + run_delivery_beta_all: + default: false + type: boolean run_delivery_beta_native: default: false type: boolean @@ -1112,6 +1116,147 @@ workflows: - equal: - main - << pipeline.git.branch >> + deliver_beta_all: + jobs: + - bump_version: + context: + - deliverino + prepare_delivery: true + - check + - check_frontend: + requires: + - check + - build_android: + buildConfig: bayern + context: + - credentials-repo + - credentials-ehrenamtskarte + flutterFlavor: Bayern + name: build_android_bayern + requires: + - bump_version + - check_frontend + - deliver_android: + buildConfig: bayern + context: + - tuerantuer-google-play + name: deliver_android_bayern + production_delivery: false + requires: + - build_android_bayern + - build_android: + buildConfig: nuernberg + context: + - credentials-repo + - credentials-ehrenamtskarte + flutterFlavor: Nuernberg + name: build_android_nuernberg + requires: + - bump_version + - check_frontend + - deliver_android: + buildConfig: nuernberg + context: + - tuerantuer-google-play + name: deliver_android_nuernberg + production_delivery: false + requires: + - build_android_nuernberg + - build_ios: + buildConfig: bayern + context: + - tuerantuer-apple + - fastlane-match + flutterFlavor: Bayern + name: build_ios_bayern + requires: + - bump_version + - check_frontend + - deliver_ios: + buildConfig: bayern + context: + - tuerantuer-apple + name: deliver_bayern_ios + production_delivery: false + requires: + - build_ios_bayern + - build_ios: + buildConfig: nuernberg + context: + - tuerantuer-apple + - fastlane-match + flutterFlavor: Nuernberg + name: build_ios_nuernberg + requires: + - bump_version + - check_frontend + - deliver_ios: + buildConfig: nuernberg + context: + - tuerantuer-apple + name: deliver_nuernberg_ios + production_delivery: false + requires: + - build_ios_nuernberg + - notify_release: + context: + - deliverino + production_delivery: false + requires: + - deliver_android_bayern + - deliver_android_nuernberg + - deliver_ios_bayern + - deliver_ios_nuernberg + - check_administration + - build_administration: + requires: + - check_administration + - bump_version + - pack_administration: + requires: + - build_administration + - build_martin + - check_backend + - build_backend: + requires: + - check_backend + - pack_backend: + requires: + - build_backend + - bump_version + - check_health_backend: + requires: + - pack_backend + - pack_martin: + requires: + - build_martin + - bump_version + - pack_meta: + requires: + - bump_version + - deliver_to_server: + bundle: administration + context: + - credentials-ehrenamtskarte + name: deliver_administration_staging + production: false + requires: + - pack_administration + - check_health_backend + - pack_martin + - pack_meta + - deliver_to_server: + bundle: backend + context: + - credentials-ehrenamtskarte + name: deliver_backend_staging + production: false + requires: + - pack_administration + - check_health_backend + - pack_martin + - pack_meta + when: << pipeline.parameters.run_delivery_beta_all >> deliver_beta_backend_administration: jobs: - bump_version: diff --git a/.circleci/src/@common.yml b/.circleci/src/@common.yml index d1278a70e..39b0b439b 100644 --- a/.circleci/src/@common.yml +++ b/.circleci/src/@common.yml @@ -31,5 +31,8 @@ parameters: default: false type: boolean run_promote_backend_administration: + default: false + type: boolean + run_delivery_beta_all: default: false type: boolean \ No newline at end of file diff --git a/.circleci/src/jobs/deliver_to_server.yml b/.circleci/src/jobs/deliver_to_server.yml index 7195f1c91..615deeebb 100644 --- a/.circleci/src/jobs/deliver_to_server.yml +++ b/.circleci/src/jobs/deliver_to_server.yml @@ -49,4 +49,4 @@ steps: name: Install package via webhook command: | curl https://webhook.entitlementcard-test.tuerantuer.org/hooks/install-<< parameters.bundle >>-$EAK_WEBHOOK -# - notify + - notify diff --git a/.circleci/src/workflows/deliver_beta_all.yml b/.circleci/src/workflows/deliver_beta_all.yml new file mode 100644 index 000000000..6571db018 --- /dev/null +++ b/.circleci/src/workflows/deliver_beta_all.yml @@ -0,0 +1,140 @@ +when: << pipeline.parameters.run_delivery_beta_all >> +jobs: + - bump_version: + prepare_delivery: true + context: + - deliverino + - check + - check_frontend: + requires: + - check + - build_android: + name: build_android_bayern + buildConfig: "bayern" + flutterFlavor: "Bayern" + requires: + - bump_version + - check_frontend + context: + - credentials-repo + - credentials-ehrenamtskarte + - deliver_android: + name: deliver_android_bayern + buildConfig: "bayern" + context: + - tuerantuer-google-play + production_delivery: false + requires: + - build_android_bayern + - build_android: + name: build_android_nuernberg + buildConfig: "nuernberg" + flutterFlavor: "Nuernberg" + requires: + - bump_version + - check_frontend + context: + - credentials-repo + - credentials-ehrenamtskarte + - deliver_android: + name: deliver_android_nuernberg + buildConfig: "nuernberg" + context: + - tuerantuer-google-play + production_delivery: false + requires: + - build_android_nuernberg + - build_ios: + name: build_ios_bayern + buildConfig: "bayern" + flutterFlavor: "Bayern" + requires: + - bump_version + - check_frontend + context: + - tuerantuer-apple + - fastlane-match + - deliver_ios: + name: deliver_bayern_ios + buildConfig: bayern + context: + - tuerantuer-apple + production_delivery: false + requires: + - build_ios_bayern + - build_ios: + name: build_ios_nuernberg + buildConfig: "nuernberg" + flutterFlavor: "Nuernberg" + requires: + - bump_version + - check_frontend + context: + - tuerantuer-apple + - fastlane-match + - deliver_ios: + name: deliver_nuernberg_ios + buildConfig: nuernberg + context: + - tuerantuer-apple + production_delivery: false + requires: + - build_ios_nuernberg + - notify_release: + production_delivery: false + context: + - deliverino + requires: + - deliver_android_bayern + - deliver_android_nuernberg + - deliver_ios_bayern + - deliver_ios_nuernberg + - check_administration + - build_administration: + requires: + - check_administration + - bump_version + - pack_administration: + requires: + - build_administration + - build_martin + - check_backend + - build_backend: + requires: + - check_backend + - pack_backend: + requires: + - build_backend + - bump_version + - check_health_backend: + requires: + - pack_backend + - pack_martin: + requires: + - build_martin + - bump_version + - pack_meta: + requires: + - bump_version + - deliver_to_server: + name: deliver_administration_staging + production: false + bundle: administration + context: + - credentials-ehrenamtskarte + requires: + - pack_administration + - check_health_backend + - pack_martin + - pack_meta + - deliver_to_server: + name: deliver_backend_staging + production: false + bundle: backend + context: + - credentials-ehrenamtskarte + requires: + - pack_administration + - check_health_backend + - pack_martin + - pack_meta diff --git a/backend/src/main/resources/graphiql/index.html b/backend/src/main/resources/graphiql/index.html index 98c1e2d0d..95ea31e46 100644 --- a/backend/src/main/resources/graphiql/index.html +++ b/backend/src/main/resources/graphiql/index.html @@ -1,6 +1,14 @@ + - + + GraphiQL - - - + + + + + + + + + + +
Loading...
- + + diff --git a/backend/src/main/resources/graphiql/renderExample.js b/backend/src/main/resources/graphiql/renderExample.js index 728b570bf..b229e3665 100644 --- a/backend/src/main/resources/graphiql/renderExample.js +++ b/backend/src/main/resources/graphiql/renderExample.js @@ -1,149 +1,84 @@ +/* global React, ReactDOM, GraphiQL, GraphQLVersion */ + /** - * This GraphiQL example illustrates how to use some of GraphiQL's props - * in order to enable reading and updating the URL parameters, making - * link sharing of queries a little bit easier. + * UMD GraphiQL Example + * + * This is a simple example that provides a primitive query string parser on top of GraphiQL props + * It assumes a global umd GraphiQL, which would be provided by an index.html in the default example * - * This is only one example of this kind of feature, GraphiQL exposes - * various React params to enable interesting integrations. + * It is used by: + * - the netlify demo + * - end to end tests + * - webpack dev server */ // Parse the search string to get url parameters. -var search = window.location.search; -var parameters = {}; -search - .substr(1) - .split('&') - .forEach(function (entry) { - var eq = entry.indexOf('='); - if (eq >= 0) { - parameters[decodeURIComponent(entry.slice(0, eq))] = decodeURIComponent( - entry.slice(eq + 1), - ); - } - }); - -// If variables was provided, try to format it. -if (parameters.variables) { - try { - parameters.variables = JSON.stringify( - JSON.parse(parameters.variables), - null, - 2, - ); - } catch (e) { - // Do nothing, we want to display the invalid JSON as a string, rather - // than present an error. - } -} - -// If headers was provided, try to format it. -if (parameters.headers) { - try { - parameters.headers = JSON.stringify( - JSON.parse(parameters.headers), - null, - 2, - ); - } catch (e) { - // Do nothing, we want to display the invalid JSON as a string, rather - // than present an error. - } +const parameters = {}; +for (const entry of window.location.search.slice(1).split("&")) { + const eq = entry.indexOf("="); + if (eq >= 0) { + parameters[decodeURIComponent(entry.slice(0, eq))] = decodeURIComponent( + entry.slice(eq + 1) + ); + } } // When the query and variables string is edited, update the URL bar so // that it can be easily shared. function onEditQuery(newQuery) { - parameters.query = newQuery; - updateURL(); + parameters.query = newQuery; + updateURL(); } function onEditVariables(newVariables) { - parameters.variables = newVariables; - updateURL(); + parameters.variables = newVariables; + updateURL(); } function onEditHeaders(newHeaders) { - parameters.headers = newHeaders; - updateURL(); + parameters.headers = newHeaders; + updateURL(); } -function onEditOperationName(newOperationName) { - parameters.operationName = newOperationName; - updateURL(); +function onTabChange(tabsState) { + const activeTab = tabsState.tabs[tabsState.activeTabIndex]; + parameters.query = activeTab.query; + parameters.variables = activeTab.variables; + parameters.headers = activeTab.headers; + updateURL(); } function updateURL() { - var newSearch = - '?' + - Object.keys(parameters) - .filter(function (key) { - return Boolean(parameters[key]); - }) - .map(function (key) { - return ( - encodeURIComponent(key) + '=' + encodeURIComponent(parameters[key]) - ); - }) - .join('&'); - history.replaceState(null, null, newSearch); -} - -// Defines a GraphQL fetcher using the fetch API. You're not required to -// use fetch, and could instead implement graphQLFetcher however you like, -// as long as it returns a Promise or Observable. -function graphQLFetcher(graphQLParams, opts = { headers: {} }) { - // When working locally, the example expects a GraphQL server at the path /graphql. - // In a PR preview, it connects to the Star Wars API externally. - // Change this to point wherever you host your GraphQL server. - const isDev = window.location.hostname.match(/localhost$/); - const api = '/'; - let headers = opts.headers; - // Convert headers to an object. - if (typeof headers === 'string') { - headers = JSON.parse(opts.headers); - } - - return fetch(api, { - method: 'post', - headers: Object.assign( - { - Accept: 'application/json', - 'Content-Type': 'application/json', - }, - headers, - ), - body: JSON.stringify(graphQLParams), - credentials: 'omit', - }) - .then(function (response) { - return response.text(); - }) - .then(function (responseBody) { - try { - return JSON.parse(responseBody); - } catch (error) { - return responseBody; - } - }); + const newSearch = Object.entries(parameters) + .filter(([_key, value]) => value) + .map( + ([key, value]) => + encodeURIComponent(key) + "=" + encodeURIComponent(value) + ) + .join("&"); + history.replaceState(null, null, `?${newSearch}`); } // Render into the body. // See the README in the top level of this module to learn more about // how you can customize GraphiQL by providing different values or // additional child elements. -ReactDOM.render( +const root = ReactDOM.createRoot(document.getElementById("graphiql")); + +root.render( React.createElement(GraphiQL, { - fetcher: graphQLFetcher, - query: parameters.query, - variables: parameters.variables, - headers: parameters.headers, - operationName: parameters.operationName, - onEditQuery: onEditQuery, - onEditVariables: onEditVariables, - onEditHeaders: onEditHeaders, - defaultSecondaryEditorOpen: true, - onEditOperationName: onEditOperationName, - headerEditorEnabled: true, - }), - document.getElementById('graphiql'), + fetcher: GraphiQL.createFetcher({ url: "/" }), + query: parameters.query, + variables: parameters.variables, + headers: parameters.headers, + defaultHeaders: parameters.defaultHeaders, + onEditQuery, + onEditVariables, + onEditHeaders, + defaultEditorToolsVisibility: true, + isHeadersEditorEnabled: true, + shouldPersistHeaders: true, + inputValueDeprecation: GraphQLVersion.includes("15.5") ? undefined : true, + onTabChange, + }) ); diff --git a/frontend/ios/fastlane/metadata/bayern/release_notes.txt b/frontend/ios/fastlane/metadata/bayern/release_notes.txt new file mode 100644 index 000000000..98e92315e --- /dev/null +++ b/frontend/ios/fastlane/metadata/bayern/release_notes.txt @@ -0,0 +1 @@ +Wir haben die App weiter für Sie verbessert und einige Fehler entfernt. Helfen Sie mit die App zu verbessern, indem Sie uns Feedback geben. \ No newline at end of file diff --git a/frontend/ios/fastlane/metadata/nuernberg/release_notes.txt b/frontend/ios/fastlane/metadata/nuernberg/release_notes.txt new file mode 100644 index 000000000..98e92315e --- /dev/null +++ b/frontend/ios/fastlane/metadata/nuernberg/release_notes.txt @@ -0,0 +1 @@ +Wir haben die App weiter für Sie verbessert und einige Fehler entfernt. Helfen Sie mit die App zu verbessern, indem Sie uns Feedback geben. \ No newline at end of file diff --git a/frontend/lib/search/filter_bar.dart b/frontend/lib/search/filter_bar.dart index 44445736f..1601e3608 100644 --- a/frontend/lib/search/filter_bar.dart +++ b/frontend/lib/search/filter_bar.dart @@ -14,9 +14,11 @@ class FilterBar extends StatelessWidget { @override Widget build(BuildContext context) { final t = context.t; - final sortedCategories = [...categoryAssets(context)]; - sortedCategories.removeWhere((category) => category.id == 9); + + final sortedCategories = [...categoryAssets(context).where((category) => category.id != 9)]; sortedCategories.sort((a, b) => a.shortName.length.compareTo(b.shortName.length)); + sortedCategories.add(categoryAssets(context).where((category) => category.id == 9).single); + final filteredCategories = sortedCategories.where((element) => buildConfig.categories.contains(element.id)); return SliverToBoxAdapter(