Compare commits

..

1 Commits

Author SHA1 Message Date
Renovate Bot
3087319091 Update dependency react to v19.0.0
Some checks failed
Check usage of free licenses / build-static-assets (pull_request) Successful in 1m54s
Add copyright notice / copyright_notice (pull_request) Successful in 3m18s
Build Nginx-based docker image / build-static-assets (push) Failing after 25m29s
Playwright Tests / test (pull_request) Has been skipped
2025-01-11 03:11:44 +00:00
5 changed files with 23 additions and 38 deletions

View File

@ -48,16 +48,6 @@ export default function AffinitiesFormDialog({ groups, group, visible, onHide }:
});
}
function resetAffinities() {
fetch(`/api/${getSlug()}/groups/${group?.id}/affinities/default`, {
method: 'GET',
headers: {
'Accept': 'application/json',
}
}).then((response) => response.json())
.then(setAffinities);
}
return (
<Dialog header="Update affinities" visible={visible} style={{ width: '60vw' }} onHide={onHide}>
{!isLoadingAffinities && <div className="card justify-evenly py-5 bg-gray-200 flex flex-col">
@ -71,10 +61,7 @@ export default function AffinitiesFormDialog({ groups, group, visible, onHide }:
</div>)
}
<div className="flex justify-center">
<button className={classNames('gray')} onClick={resetAffinities} >Reset</button>
<button className={classNames('primary')} onClick={submitAffinities} >Update</button>
</div>
<button className={classNames('primary')} onClick={submitAffinities} >Update</button>
</div>
}
</Dialog>

View File

@ -2,14 +2,13 @@
import clsx from "clsx";
type ButtonColor = 'primary' | 'blue' | 'green' | 'red' | 'yellow' | 'gray';
type ButtonColor = 'primary' | 'blue' | 'green' | 'red' | 'yellow';
export function classNames(type: ButtonColor) {
return (clsx("text-white py-1 px-2 mx-1 rounded disabled:opacity-50 disabled:cursor-not-allowed", {
'bg-blue-400 hover:bg-blue-600': type === 'primary' || type === 'blue',
'bg-green-500 hover:bg-green-600': type === 'green',
'bg-red-500 hover:bg-red-600': type === 'red',
'bg-yellow-500 hover:bg-yellow-700': type === 'yellow',
'bg-gray-500 hover:bg-gray-700': type === 'gray'
'bg-yellow-500 hover:bg-yellow-700': type === 'yellow'
}))
}

View File

@ -35,7 +35,6 @@ export default function GroupsTable({ groups, onUpdate, onEdit, onEditAffinities
return acc;
}, new Map());
groups.forEach(group => group.children = []);
groups.forEach(group => {
if (group.parentId) {
const parent = index.get(group.parentId);

View File

@ -28,7 +28,7 @@
"@playwright/test": "^1.46.0",
"@types/bcrypt": "^5.0.2",
"@types/node": "22.10.5",
"@types/react": "19.0.6",
"@types/react": "19.0.4",
"@types/react-dom": "18.3.5"
},
"engines": {

38
pnpm-lock.yaml generated
View File

@ -13,7 +13,7 @@ importers:
version: 2.2.0(react@19.0.0)
'@tailwindcss/forms':
specifier: ^0.5.7
version: 0.5.10(tailwindcss@3.4.17)
version: 0.5.9(tailwindcss@3.4.17)
autoprefixer:
specifier: 10.4.20
version: 10.4.20(postcss@8.4.49)
@ -37,7 +37,7 @@ importers:
version: 7.0.0
primereact:
specifier: ^10.8.2
version: 10.9.1(@types/react@19.0.6)(react-dom@19.0.0-rc-f38c22b244-20240704(react@19.0.0))(react@19.0.0)
version: 10.9.1(@types/react@19.0.4)(react-dom@19.0.0-rc-f38c22b244-20240704(react@19.0.0))(react@19.0.0)
react:
specifier: 19.0.0
version: 19.0.0
@ -70,11 +70,11 @@ importers:
specifier: 22.10.5
version: 22.10.5
'@types/react':
specifier: 19.0.6
version: 19.0.6
specifier: 19.0.4
version: 19.0.4
'@types/react-dom':
specifier: 18.3.5
version: 18.3.5(@types/react@19.0.6)
version: 18.3.5(@types/react@19.0.4)
packages:
@ -320,10 +320,10 @@ packages:
'@swc/helpers@0.5.15':
resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==}
'@tailwindcss/forms@0.5.10':
resolution: {integrity: sha512-utI1ONF6uf/pPNO68kmN1b8rEwNXv3czukalo8VtJH8ksIkZXr3Q3VYudZLkCsDd4Wku120uF02hYK25XGPorw==}
'@tailwindcss/forms@0.5.9':
resolution: {integrity: sha512-tM4XVr2+UVTxXJzey9Twx48c1gcxFStqn1pQz0tRsX8o3DvxhN5oY5pvyAbUx7VTaZxpej4Zzvc6h+1RJBzpIg==}
peerDependencies:
tailwindcss: '>=3.0.0 || >= 3.0.0-alpha.1 || >= 4.0.0-alpha.20 || >= 4.0.0-beta.1'
tailwindcss: '>=3.0.0 || >= 3.0.0-alpha.1 || >= 4.0.0-alpha.20'
'@types/bcrypt@5.0.2':
resolution: {integrity: sha512-6atioO8Y75fNcbmj0G7UjI9lXN2pQ/IGJ2FWT4a/btd0Lk9lQalHLKhkgKVZ3r+spnmWUKfbMi1GEe9wyHQfNQ==}
@ -344,8 +344,8 @@ packages:
peerDependencies:
'@types/react': '*'
'@types/react@19.0.6':
resolution: {integrity: sha512-gIlMztcTeDgXCUj0vCBOqEuSEhX//63fW9SZtCJ+agxoQTOklwDfiEMlTWn4mR/C/UK5VHlpwsCsOyf7/hc4lw==}
'@types/react@19.0.4':
resolution: {integrity: sha512-3O4QisJDYr1uTUMZHA2YswiQZRq+Pd8D+GdVFYikTutYsTz+QZgWkAPnP7rx9txoI6EXKcPiluMqWPFV3tT9Wg==}
abbrev@1.1.1:
resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==}
@ -1355,7 +1355,7 @@ snapshots:
dependencies:
tslib: 2.8.1
'@tailwindcss/forms@0.5.10(tailwindcss@3.4.17)':
'@tailwindcss/forms@0.5.9(tailwindcss@3.4.17)':
dependencies:
mini-svg-data-uri: 1.4.4
tailwindcss: 3.4.17
@ -1370,15 +1370,15 @@ snapshots:
dependencies:
undici-types: 6.20.0
'@types/react-dom@18.3.5(@types/react@19.0.6)':
'@types/react-dom@18.3.5(@types/react@19.0.4)':
dependencies:
'@types/react': 19.0.6
'@types/react': 19.0.4
'@types/react-transition-group@4.4.12(@types/react@19.0.6)':
'@types/react-transition-group@4.4.12(@types/react@19.0.4)':
dependencies:
'@types/react': 19.0.6
'@types/react': 19.0.4
'@types/react@19.0.6':
'@types/react@19.0.4':
dependencies:
csstype: 3.1.3
@ -1882,14 +1882,14 @@ snapshots:
primeicons@7.0.0: {}
primereact@10.9.1(@types/react@19.0.6)(react-dom@19.0.0-rc-f38c22b244-20240704(react@19.0.0))(react@19.0.0):
primereact@10.9.1(@types/react@19.0.4)(react-dom@19.0.0-rc-f38c22b244-20240704(react@19.0.0))(react@19.0.0):
dependencies:
'@types/react-transition-group': 4.4.12(@types/react@19.0.6)
'@types/react-transition-group': 4.4.12(@types/react@19.0.4)
react: 19.0.0
react-dom: 19.0.0-rc-f38c22b244-20240704(react@19.0.0)
react-transition-group: 4.4.5(react-dom@19.0.0-rc-f38c22b244-20240704(react@19.0.0))(react@19.0.0)
optionalDependencies:
'@types/react': 19.0.6
'@types/react': 19.0.4
prop-types@15.8.1:
dependencies: