Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop to master #481

Merged
merged 69 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
16b060b
Update Github actions' and its node versions
henrinie-nc Feb 1, 2024
5310608
Update dockerfile to use node18, enable devDependencies
henrinie-nc Feb 1, 2024
d2d5e6d
Update dev image and nvmrc to node 18
henrinie-nc Feb 1, 2024
8ff2746
Updates build dependencies (create-react-app/webpack)
henrinie-nc Feb 7, 2024
3d5752d
Remove commented code
henrinie-nc Feb 8, 2024
b5c7837
Merge pull request #456 from City-of-Helsinki/chore/update-node-gh-ac…
henrinie-nc Feb 8, 2024
79ccf8a
Fix fieldtype mapping after removal of FieldType in backend (#462)
henrinie-nc Feb 28, 2024
3ffb6c6
Allow changing only preparer in areasearch list view (#463)
henrinie-nc Feb 29, 2024
832c75a
Allow text to wrap to next line in areasearch application (#464)
henrinie-nc Mar 1, 2024
9709134
Hide show mark all in area search applicant info (#465)
henrinie-nc Mar 1, 2024
ab36159
Add change history to area search (#467)
henrinie-nc Mar 13, 2024
f26cec2
area search application: remove fieldtype mapping
NC-jsAhonen Apr 3, 2024
286ce87
Merge pull request #471 from City-of-Helsinki/MVJ-146-fix-area-search…
NC-jsAhonen Apr 15, 2024
0d7e05a
Add service units to redux store
juhakujala Jun 23, 2022
49b32ea
Get users service units to redux store
juhakujala Jun 23, 2022
97a5633
Add user active service unit selection to top navigation
juhakujala Jun 23, 2022
1492ae8
Add service unit filtering for select elements that require it
juhakujala Jun 23, 2022
c242ae6
FormField: Add support for passing service unit for form fields
juhakujala Jun 23, 2022
655f054
Contacts: Add support for service units
juhakujala Jun 23, 2022
9781e6a
Leases: Add support for service units
juhakujala Jun 23, 2022
1dcad59
Invoice Notes: Add support for service units
juhakujala Jun 23, 2022
003b525
SAP Invoices: Add support for service units
juhakujala Jun 23, 2022
e5f267c
Infill development: Add support for service units
juhakujala Jun 23, 2022
fb3fe1d
Update some of the FormNames enum values
juhakujala Jun 23, 2022
aea3347
service units to user pems tests
NC-jsAhonen Oct 16, 2023
3e4aa91
service unit id: small cleanup
NC-jsAhonen Nov 7, 2023
a175aed
simplify filtering by active service unit logic
NC-jsAhonen Nov 7, 2023
a291b07
statistic reports: multiselect for service units
NC-jsAhonen Nov 8, 2023
163734f
statistic reports: parse query for service units
NC-jsAhonen Nov 8, 2023
8e14683
simplify if statements in invoice note list page
NC-jsAhonen Nov 10, 2023
218dd2d
simplify service unit check in some permissions
NC-jsAhonen Nov 21, 2023
0bdc05c
combine if statements in create lease form
NC-jsAhonen Nov 21, 2023
f3cf372
simplify null check in user service unit select
NC-jsAhonen Nov 21, 2023
5f9c152
user service unit select: change filter into find
NC-jsAhonen Nov 22, 2023
4a9e70f
leasing summary: add internal_order field
NC-jsAhonen Dec 14, 2023
ab49291
wip: filter receivable types by service unit
NC-jsAhonen Dec 20, 2023
ff68b95
edit internal order if there is permission
NC-jsAhonen Jan 8, 2024
de1a3d0
internal_order: not exactly but max 12 chars
NC-jsAhonen Jan 8, 2024
bfdb9f3
fix receivable type filtering in create charge
NC-jsAhonen Jan 10, 2024
af72fdc
filter receivable types by service unit: add unit test
NC-jsAhonen Jan 10, 2024
a244916
filter area search by service unit
NC-jsAhonen Mar 6, 2024
b9907c5
temp: loader for receivable type field to prevent crash
NC-jsAhonen Apr 17, 2024
188b224
Merge pull request #430 from City-of-Helsinki/service-units-2
NC-jsAhonen Apr 17, 2024
a334df7
area search application: add and remove attachments
NC-jsAhonen Apr 4, 2024
a053881
remove default service unit filter from area search application list …
NC-jsAhonen Apr 22, 2024
7d5c606
Merge pull request #474 from City-of-Helsinki/MVJ-147-add-area-search…
NC-jsAhonen Apr 23, 2024
a72e31c
Merge pull request #475 from City-of-Helsinki/remove-service-unit-fil…
NC-jsAhonen Apr 25, 2024
9db9013
fix removing rent adjustment
NC-jsAhonen Aug 30, 2023
c5ed6b2
Merge pull request #476 from City-of-Helsinki/MVJ-7
NC-jsAhonen May 2, 2024
fa4f9de
move service unit filter next to basic search in leases view
robertrytovuori May 3, 2024
5e67ae1
fix adding subventions for newly added rent adjustments
NC-jsAhonen May 6, 2024
d97e5b6
Merge pull request #478 from City-of-Helsinki/MVJ-7-fix-add-subventio…
NC-jsAhonen May 6, 2024
ddda132
fix checking changes in subventions
NC-jsAhonen May 8, 2024
16506bc
create helper isRentDeleted
NC-jsAhonen May 8, 2024
ff5e433
Merge pull request #479 from City-of-Helsinki/MVJ-7-fix-add-subventio…
NC-jsAhonen May 10, 2024
868219b
move service unit filter to suodatus component
robertrytovuori May 10, 2024
33e3f52
move service unit filter into suodatus component
robertrytovuori May 14, 2024
b0255bd
rename componentToRenderNextToLabel to ...UnderLabel
robertrytovuori May 14, 2024
f237ac0
change palvelukokonaisuus in top navigation to oma palvelukokonaisuus
robertrytovuori May 14, 2024
c25f591
fix issue where detailed search is cleared when service unit filter c…
robertrytovuori May 14, 2024
2e8de82
fix missing icons after webpack update
robertrytovuori May 15, 2024
f90f32e
add file-loader as dependency as url-loader depends on it
robertrytovuori May 15, 2024
b9a1230
remove url from dependencies
robertrytovuori May 15, 2024
2eb25dc
rename to componentToRenderUnderTitle
robertrytovuori May 15, 2024
8bc1fdb
detailed search view should not render when the service unit filter i…
robertrytovuori May 15, 2024
fc5f539
Merge pull request #477 from City-of-Helsinki/MVJ-218_move-service-un…
robertrytovuori May 16, 2024
3e73f30
Merge pull request #480 from City-of-Helsinki/MVJ-248_selects-missing…
robertrytovuori May 16, 2024
be3a203
url package to devDependencies
NC-jsAhonen May 22, 2024
886ea9c
Merge pull request #466 from City-of-Helsinki/fix/url-polyfill-for-we…
NC-jsAhonen May 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"Generator": true,
"__DEV__": true
},
"parser": "babel-eslint",
"parser": "@babel/eslint-parser",
"rules": {
"comma-dangle": [2, "always-multiline"],
"comma-spacing": 2,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
sonarcloud:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: SonarCloud Scan
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:

strategy:
matrix:
node-version: [14.x]
node: [18, 20]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: yarn
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.15.1
18
14 changes: 9 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ===============================================
FROM node:14-slim AS appbase
FROM node:18-slim AS appbase
# ===============================================

RUN groupadd -g 1001 appuser \
Expand All @@ -13,9 +13,9 @@ WORKDIR /app
# Offical image has npm log verbosity as info. More info - https://github.com/nodejs/docker-node#verbosity
ENV NPM_CONFIG_LOGLEVEL warn

# set our node environment, either development or production
# defaults to production, compose overrides this to development on build and run
ARG NODE_ENV=production
# set node environment, either development or production
# use development to install devDependencies
ARG NODE_ENV=development
ENV NODE_ENV $NODE_ENV

# Global npm deps in a non-root user directory
Expand All @@ -30,7 +30,7 @@ RUN yarn policies set-version $YARN_VERSION
USER appuser

# Copy package.json and package-lock.json/yarn.lock files
COPY package*.json *yarn* ./
COPY package.json yarn.lock ./

# Install npm depepndencies
ENV PATH /app/node_modules/.bin:$PATH
Expand Down Expand Up @@ -67,6 +67,10 @@ CMD ["react-scripts", "start"]
FROM appbase as staticbuilder
# ===================================

# Set NODE_ENV to production in the staticbuilder container
ARG NODE_ENV=production
ENV NODE_ENV $NODE_ENV

COPY . /app
RUN yarn compile

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:10.15
FROM node:18

WORKDIR /app

Expand Down
39 changes: 20 additions & 19 deletions config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');

const getClientEnvironment = require('./env');
const paths = require('./paths');

// Webpack uses `publicPath` to determine where the app is being served from.
// In development, we always serve from the root. This makes config easier.
const publicPath = '/';
Expand Down Expand Up @@ -92,7 +90,10 @@ module.exports = {
},
{
test: /\.(eot|svg|png|jpe?g)?(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: require.resolve('file-loader'),
type: 'asset/resource',
generator: {
filename: '[hash][ext]'
},
},
{
test: [
Expand Down Expand Up @@ -129,33 +130,33 @@ module.exports = {
// a plugin that prints an error when you attempt to do this.
// See https://github.com/facebookincubator/create-react-app/issues/240
new CaseSensitivePathsPlugin(),
// If you require a missing module and then `npm install` it, you still have
// to restart the development server for Webpack to discover it. This plugin
// makes the discovery automatic so you don't have to restart.
// See https://github.com/facebookincubator/create-react-app/issues/186
new WatchMissingNodeModulesPlugin(paths.appNodeModules),
// This is a practical solution that requires the user to opt into importing specific locales.
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
// You can remove this if you don't use Moment.js:
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),

new FaviconsWebpackPlugin({
logo: path.resolve(__dirname, '../assets/images/favicon.png'),
persistentCache: true,
new webpack.IgnorePlugin({
resourceRegExp: /^\.\/locale$/,
contextRegExp: /moment$/,
}),
],
// Some libraries import Node modules but don't use them in the browser.
// Tell Webpack to provide empty mocks for them so importing them works.
node: {
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
resolve: {
fallback: {
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
}
},
// Turn off performance hints during development because we don't do any
// splitting or minification in interest of speed. These warnings become
// cumbersome.
performance: {
hints: false,
},
// Reportedly, this avoids CPU overload on some systems.
// https://github.com/facebookincubator/create-react-app/issues/293
watchOptions: {
ignored: /node_modules/,
},
};
32 changes: 16 additions & 16 deletions config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
const ManifestPlugin = require('webpack-manifest-plugin');
const WorkboxWebpackPlugin = require('workbox-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');
const paths = require('./paths');
const getClientEnvironment = require('./env');
Expand Down Expand Up @@ -104,7 +103,10 @@ module.exports = {
},
{
test: /\.(eot|svg|png|jpe?g)?(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: require.resolve('file-loader'),
type: 'asset/resource',
generator: {
filename: '[hash][ext]'
},
},
{
test: [
Expand Down Expand Up @@ -170,17 +172,16 @@ module.exports = {
// Generate a manifest file which contains a mapping of all asset filenames
// to their corresponding output file so that tools can pick it up without
// having to parse `index.html`.
new ManifestPlugin({
new ManifestPlugin.WebpackManifestPlugin({
fileName: 'asset-manifest.json',
}),
// Generate a service worker script that will precache, and keep up to date,
// the HTML & assets that are part of the Webpack build.
new WorkboxWebpackPlugin.GenerateSW({
clientsClaim: true,
exclude: [/\.map$/, /asset-manifest\.json$/],
importWorkboxFrom: 'cdn',
navigateFallback: publicUrl + '/index.html',
navigateFallbackBlacklist: [
navigateFallbackDenylist: [
// Exclude URLs starting with /_, as they're likely an API call
new RegExp('^/_'),
// Exclude URLs containing a dot, as they're likely a resource in
Expand All @@ -190,16 +191,13 @@ module.exports = {
}),
// This is a practical solution that requires the user to opt into importing specific locales.
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),

new FaviconsWebpackPlugin({
logo: path.resolve(__dirname, '../assets/images/favicon.png'),
persistentCache: true,
new webpack.IgnorePlugin({
resourceRegExp: /^\.\/locale$/,
contextRegExp: /moment$/,
}),
],
optimization: {
minimizer: [new TerserPlugin({
sourceMap: shouldUseSourceMap,
terserOptions: {
warnings: false,
output: {
Expand All @@ -211,10 +209,12 @@ module.exports = {
},
// Some libraries import Node modules but don't use them in the browser.
// Tell Webpack to provide empty mocks for them so importing them works.
node: {
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
resolve: {
fallback: {
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
}
},
};
58 changes: 22 additions & 36 deletions config/webpackDevServer.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,65 +2,51 @@

const errorOverlayMiddleware = require('react-dev-utils/errorOverlayMiddleware');
const noopServiceWorkerMiddleware = require('react-dev-utils/noopServiceWorkerMiddleware');
const config = require('./webpack.config.dev');
const webpackConfig = require('./webpack.config.dev');

const protocol = process.env.HTTPS === 'true' ? 'https' : 'http';
const host = process.env.HOST || '0.0.0.0';
const port = process.env.PORT || 3000;

module.exports = function(proxy, allowedHost) {
module.exports = function() {
return {
// WebpackDevServer 2.4.3 introduced a security fix that prevents remote
// websites from potentially accessing local content through DNS rebinding:
// https://github.com/webpack/webpack-dev-server/issues/887
// https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a
// However, it made several existing use cases such as development in cloud
// environment or subdomains in development significantly more complicated:
// https://github.com/facebookincubator/create-react-app/issues/2271
// https://github.com/facebookincubator/create-react-app/issues/2233
disableHostCheck:
!proxy || process.env.DANGEROUSLY_DISABLE_HOST_CHECK === 'true',
allowedHosts: ['localhost', '0.0.0.0', '127.0.0.1'],
// Enable gzip compression of generated files.
compress: true,
// Silence WebpackDevServer's own logs since they're generally not useful.
// It will still show compile warnings and errors with this setting.
clientLogLevel: 'none',
// By default files from `contentBase` will not trigger a page reload.
watchContentBase: true,
// Enable hot reloading server. It will provide /sockjs-node/ endpoint
// for the WebpackDevServer client so it can learn when the files were
// updated. The WebpackDevServer client is included as an entry point
// in the Webpack development configuration. Note that only changes
// to CSS are currently hot reloaded. JS changes will refresh the browser.
hot: true,
// It is important to tell WebpackDevServer to use the same "root" path
// as we specified in the config. In development, we always serve from /.
publicPath: config.output.publicPath,
quiet: false,
// Reportedly, this avoids CPU overload on some systems.
// https://github.com/facebookincubator/create-react-app/issues/293
watchOptions: {
ignored: /node_modules/,
static: {
directory: webpackConfig.output.path,
watch: true,
},
// Enable HTTPS if the HTTPS environment variable is set to 'true'
https: protocol === 'https',
host: host,
overlay: false,
client: {
logging: 'none',
overlay: false,
},
open: true,
devMiddleware: {
publicPath: webpackConfig.output.publicPath,
},
historyApiFallback: {
// Paths with dots should still use the history fallback.
// See https://github.com/facebookincubator/create-react-app/issues/387.
disableDotRule: true,
},
public: allowedHost,
proxy,
setup(app) {
host: host,
port: port,
//proxy,
setupMiddlewares: function(middlewares) {
// This lets us open files from the runtime error overlay.
app.use(errorOverlayMiddleware());
middlewares.unshift(errorOverlayMiddleware());
// This service worker file is effectively a 'no-op' that will reset any
// previous service worker registered for the same host:port combination.
// We do this in development to avoid hitting the production cache if
// it used the same host and port.
// https://github.com/facebookincubator/create-react-app/issues/2272#issuecomment-302832432
app.use(noopServiceWorkerMiddleware());
middlewares.unshift(noopServiceWorkerMiddleware(webpackConfig.output.publicPath));
return middlewares;
},
};
};
Loading