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

Feature/add bundestagio to pnpm #523

Merged
merged 8 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
55 changes: 0 additions & 55 deletions .github/workflows/deploy-bundestag.io-admin.yaml

This file was deleted.

76 changes: 0 additions & 76 deletions .github/workflows/deploy-bundestag.io-api.yaml

This file was deleted.

76 changes: 0 additions & 76 deletions .github/workflows/deploy-bundestag.io-dip.yaml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
paths:
- 'services/**'
- 'bundestag.io/**'
branches:
- 'master'

Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.20.2
v18.18.2
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enable-pre-post-scripts=true
3 changes: 2 additions & 1 deletion bundestag.io/admin/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": ["next", "next/core-web-vitals"],
"rules": {
"react/display-name": 0
"react/display-name": 0,
"@typescript-eslint/no-explicit-any": ["warn"]
}
}
41 changes: 0 additions & 41 deletions bundestag.io/admin/Dockerfile

This file was deleted.

7 changes: 3 additions & 4 deletions bundestag.io/admin/components/App.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
const App = ({ children }) => (
<main>
{children}
<style jsx global>{`
<style>{`
* {
font-family: Menlo, Monaco, "Lucida Console", "Liberation Mono",
"DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New",
monospace, serif;
font-family: Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono',
'Courier New', monospace, serif;
}
body {
margin: 0;
Expand Down
14 changes: 3 additions & 11 deletions bundestag.io/admin/components/Form/DatePicker.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { Form, DatePicker as AntDatePicker } from "antd";
import { Form, DatePicker as AntDatePicker } from 'antd';

const FormItem = Form.Item;

export const DatePicker = ({
field, // { name, value, onChange, onBlur }
form: { touched, errors, setFieldValue, setFieldTouched }, // also values, setXXXX, handleXXXX, dirty, isValid, status, etc.
itemProps,
onChange,
onBlur,
...props
}) => {
const handleChange = (value) => {
Expand All @@ -18,16 +16,10 @@ export const DatePicker = ({
setFieldTouched(field.name, !status);
};

const errorMsg =
touched[field.name] && errors[field.name] ? errors[field.name] : false;
const errorMsg = touched[field.name] && errors[field.name] ? errors[field.name] : false;

return (
<FormItem
{...itemProps}
validateStatus={
errorMsg ? "error" : touched[field.name] ? "success" : null
}
>
<FormItem {...itemProps} validateStatus={errorMsg ? 'error' : touched[field.name] ? 'success' : null}>
<AntDatePicker
{...field}
{...props}
Expand Down
10 changes: 3 additions & 7 deletions bundestag.io/admin/components/Form/Input.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
import { Form, Input as AntInput } from "antd";
import { Form, Input as AntInput } from 'antd';

const FormItem = Form.Item;

export const Input = ({
field, // { name, value, onChange, onBlur }
form: { touched, errors, setFieldValue }, // also values, setXXXX, handleXXXX, dirty, isValid, status, etc.
itemProps,
onChange,
...props
}) => {
const handleChange = (value) => {
setFieldValue(field.name, value);
};

const errorMsg =
touched[field.name] && errors[field.name] ? errors[field.name] : "";
const errorMsg = touched[field.name] && errors[field.name] ? errors[field.name] : '';

return (
<FormItem
{...itemProps}
help={errorMsg}
validateStatus={
errorMsg ? "error" : touched[field.name] ? "success" : null
}
validateStatus={errorMsg ? 'error' : touched[field.name] ? 'success' : null}
hasFeedback
>
<AntInput {...field} {...props} onChange={handleChange} />
Expand Down
10 changes: 3 additions & 7 deletions bundestag.io/admin/components/Form/InputNumber.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
import { Form, InputNumber as AntInputNumber } from "antd";
import { Form, InputNumber as AntInputNumber } from 'antd';

const FormItem = Form.Item;

export const InputNumber = ({
field, // { name, value, onChange, onBlur }
form: { touched, errors, setFieldValue }, // also values, setXXXX, handleXXXX, dirty, isValid, status, etc.
itemProps,
onChange,
...props
}) => {
const handleChange = (value) => {
setFieldValue(field.name, value);
};

const errorMsg =
touched[field.name] && errors[field.name] ? errors[field.name] : "";
const errorMsg = touched[field.name] && errors[field.name] ? errors[field.name] : '';

return (
<FormItem
{...itemProps}
help={errorMsg}
validateStatus={
errorMsg ? "error" : touched[field.name] ? "success" : null
}
validateStatus={errorMsg ? 'error' : touched[field.name] ? 'success' : null}
hasFeedback
>
<AntInputNumber {...field} {...props} onChange={handleChange} />
Expand Down
Loading
Loading