Compare commits

...

7 Commits

Author SHA1 Message Date
Renovate Bot
fe12a378e0 Update dependency react to v19.0.0
Some checks failed
Playwright Tests / test (pull_request) Has been skipped
Add copyright notice / copyright_notice (pull_request) Successful in 2m32s
Check usage of free licenses / build-static-assets (pull_request) Successful in 2m52s
Build Nginx-based docker image / build-static-assets (push) Failing after 6m5s
2025-01-13 03:04:07 +00:00
0c05cf7661 Merge pull request 'Prevent duplicate groups in the tree list' (#178) from fix-dup-groups into main
All checks were successful
Playwright Tests / test (push) Has been skipped
Check usage of free licenses / build-static-assets (push) Successful in 22s
Build Nginx-based docker image / build-static-assets (push) Successful in 3m11s
Reviewed-on: #178
2025-01-12 22:17:27 +00:00
f0e6ff9425 Prevent duplicate groups in the tree list
All checks were successful
Playwright Tests / test (pull_request) Has been skipped
Build Nginx-based docker image / build-static-assets (push) Successful in 2m33s
Check usage of free licenses / build-static-assets (pull_request) Successful in 30s
Add copyright notice / copyright_notice (pull_request) Successful in 32s
2025-01-12 23:14:50 +01:00
20bd7f5983 Merge pull request 'Update dependency @tailwindcss/forms to v0.5.10' (#172) from renovate/tailwindcss-forms-0.x-lockfile into main
All checks were successful
Playwright Tests / test (push) Has been skipped
Check usage of free licenses / build-static-assets (push) Successful in 17s
Build Nginx-based docker image / build-static-assets (push) Successful in 4m6s
Reviewed-on: #172
2025-01-12 21:47:37 +00:00
52902ff2ba Merge pull request 'Define a button to load the default affinities of a group' (#177) from affinity-reset into main
All checks were successful
Playwright Tests / test (push) Has been skipped
Check usage of free licenses / build-static-assets (push) Successful in 1m29s
Build Nginx-based docker image / build-static-assets (push) Successful in 5m42s
Reviewed-on: #177
2025-01-12 21:27:56 +00:00
c233cb60de Define a button to load the default affinities of a group
All checks were successful
Playwright Tests / test (pull_request) Has been skipped
Add copyright notice / copyright_notice (pull_request) Successful in 2m0s
Check usage of free licenses / build-static-assets (pull_request) Successful in 3m18s
Build Nginx-based docker image / build-static-assets (push) Successful in 7m19s
2025-01-12 20:54:41 +01:00
Renovate Bot
44ba54db95 Update dependency @tailwindcss/forms to v0.5.10
All checks were successful
Build Nginx-based docker image / build-static-assets (push) Successful in 4m45s
Check usage of free licenses / build-static-assets (pull_request) Successful in 1m20s
Playwright Tests / test (pull_request) Has been skipped
Add copyright notice / copyright_notice (pull_request) Successful in 2m26s
2025-01-11 03:11:24 +00:00
5 changed files with 70 additions and 61 deletions

View File

@ -48,6 +48,16 @@ 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">
@ -61,7 +71,10 @@ export default function AffinitiesFormDialog({ groups, group, visible, onHide }:
</div>)
}
<button className={classNames('primary')} onClick={submitAffinities} >Update</button>
<div className="flex justify-center">
<button className={classNames('gray')} onClick={resetAffinities} >Reset</button>
<button className={classNames('primary')} onClick={submitAffinities} >Update</button>
</div>
</div>
}
</Dialog>

View File

@ -2,13 +2,14 @@
import clsx from "clsx";
type ButtonColor = 'primary' | 'blue' | 'green' | 'red' | 'yellow';
type ButtonColor = 'primary' | 'blue' | 'green' | 'red' | 'yellow' | 'gray';
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-yellow-500 hover:bg-yellow-700': type === 'yellow',
'bg-gray-500 hover:bg-gray-700': type === 'gray'
}))
}

View File

@ -35,6 +35,7 @@ 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

@ -16,7 +16,7 @@
"postcss": "8.4.49",
"primeicons": "^7.0.0",
"primereact": "^10.8.2",
"react": "19.0.0-rc-f38c22b244-20240704",
"react": "19.0.0",
"react-dom": "19.0.0-rc-f38c22b244-20240704",
"tailwindcss": "3.4.17",
"typescript": "5.7.3",
@ -28,7 +28,7 @@
"@playwright/test": "^1.46.0",
"@types/bcrypt": "^5.0.2",
"@types/node": "22.10.5",
"@types/react": "18.3.18",
"@types/react": "19.0.6",
"@types/react-dom": "18.3.5"
},
"engines": {

106
pnpm-lock.yaml generated
View File

@ -10,10 +10,10 @@ importers:
dependencies:
'@heroicons/react':
specifier: ^2.1.4
version: 2.2.0(react@19.0.0-rc-f38c22b244-20240704)
version: 2.2.0(react@19.0.0)
'@tailwindcss/forms':
specifier: ^0.5.7
version: 0.5.9(tailwindcss@3.4.17)
version: 0.5.10(tailwindcss@3.4.17)
autoprefixer:
specifier: 10.4.20
version: 10.4.20(postcss@8.4.49)
@ -25,10 +25,10 @@ importers:
version: 2.1.1
next:
specifier: 15.1.4
version: 15.1.4(@playwright/test@1.49.1)(react-dom@19.0.0-rc-f38c22b244-20240704(react@19.0.0-rc-f38c22b244-20240704))(react@19.0.0-rc-f38c22b244-20240704)
version: 15.1.4(@playwright/test@1.49.1)(react-dom@19.0.0-rc-f38c22b244-20240704(react@19.0.0))(react@19.0.0)
next-auth:
specifier: 5.0.0-beta.25
version: 5.0.0-beta.25(next@15.1.4(@playwright/test@1.49.1)(react-dom@19.0.0-rc-f38c22b244-20240704(react@19.0.0-rc-f38c22b244-20240704))(react@19.0.0-rc-f38c22b244-20240704))(react@19.0.0-rc-f38c22b244-20240704)
version: 5.0.0-beta.25(next@15.1.4(@playwright/test@1.49.1)(react-dom@19.0.0-rc-f38c22b244-20240704(react@19.0.0))(react@19.0.0))(react@19.0.0)
postcss:
specifier: 8.4.49
version: 8.4.49
@ -37,13 +37,13 @@ importers:
version: 7.0.0
primereact:
specifier: ^10.8.2
version: 10.9.1(@types/react@18.3.18)(react-dom@19.0.0-rc-f38c22b244-20240704(react@19.0.0-rc-f38c22b244-20240704))(react@19.0.0-rc-f38c22b244-20240704)
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)
react:
specifier: 19.0.0-rc-f38c22b244-20240704
version: 19.0.0-rc-f38c22b244-20240704
specifier: 19.0.0
version: 19.0.0
react-dom:
specifier: 19.0.0-rc-f38c22b244-20240704
version: 19.0.0-rc-f38c22b244-20240704(react@19.0.0-rc-f38c22b244-20240704)
version: 19.0.0-rc-f38c22b244-20240704(react@19.0.0)
tailwindcss:
specifier: 3.4.17
version: 3.4.17
@ -52,7 +52,7 @@ importers:
version: 5.7.3
use-debounce:
specifier: ^10.0.1
version: 10.0.4(react@19.0.0-rc-f38c22b244-20240704)
version: 10.0.4(react@19.0.0)
uuid:
specifier: 11.0.5
version: 11.0.5
@ -70,11 +70,11 @@ importers:
specifier: 22.10.5
version: 22.10.5
'@types/react':
specifier: 18.3.18
version: 18.3.18
specifier: 19.0.6
version: 19.0.6
'@types/react-dom':
specifier: 18.3.5
version: 18.3.5(@types/react@18.3.18)
version: 18.3.5(@types/react@19.0.6)
packages:
@ -320,10 +320,10 @@ packages:
'@swc/helpers@0.5.15':
resolution: {integrity: sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==}
'@tailwindcss/forms@0.5.9':
resolution: {integrity: sha512-tM4XVr2+UVTxXJzey9Twx48c1gcxFStqn1pQz0tRsX8o3DvxhN5oY5pvyAbUx7VTaZxpej4Zzvc6h+1RJBzpIg==}
'@tailwindcss/forms@0.5.10':
resolution: {integrity: sha512-utI1ONF6uf/pPNO68kmN1b8rEwNXv3czukalo8VtJH8ksIkZXr3Q3VYudZLkCsDd4Wku120uF02hYK25XGPorw==}
peerDependencies:
tailwindcss: '>=3.0.0 || >= 3.0.0-alpha.1 || >= 4.0.0-alpha.20'
tailwindcss: '>=3.0.0 || >= 3.0.0-alpha.1 || >= 4.0.0-alpha.20 || >= 4.0.0-beta.1'
'@types/bcrypt@5.0.2':
resolution: {integrity: sha512-6atioO8Y75fNcbmj0G7UjI9lXN2pQ/IGJ2FWT4a/btd0Lk9lQalHLKhkgKVZ3r+spnmWUKfbMi1GEe9wyHQfNQ==}
@ -334,9 +334,6 @@ packages:
'@types/node@22.10.5':
resolution: {integrity: sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==}
'@types/prop-types@15.7.12':
resolution: {integrity: sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==}
'@types/react-dom@18.3.5':
resolution: {integrity: sha512-P4t6saawp+b/dFrUr2cvkVsfvPguwsxtH6dNIYRllMsefqFzkZk5UIjzyDOv5g1dXIPdG4Sp1yCR4Z6RCUsG/Q==}
peerDependencies:
@ -347,8 +344,8 @@ packages:
peerDependencies:
'@types/react': '*'
'@types/react@18.3.18':
resolution: {integrity: sha512-t4yC+vtgnkYjNSKlFx1jkAhH8LgTo2N/7Qvi83kdEaUtMDiwpbLAktKDaAMlRcJ5eSxZkH74eEGt1ky31d7kfQ==}
'@types/react@19.0.6':
resolution: {integrity: sha512-gIlMztcTeDgXCUj0vCBOqEuSEhX//63fW9SZtCJ+agxoQTOklwDfiEMlTWn4mR/C/UK5VHlpwsCsOyf7/hc4lw==}
abbrev@1.1.1:
resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==}
@ -942,8 +939,8 @@ packages:
react: '>=16.6.0'
react-dom: '>=16.6.0'
react@19.0.0-rc-f38c22b244-20240704:
resolution: {integrity: sha512-OP8O6Oc1rdR9IdIKJRKaL1PYd4eGkn6f88VqiygWyyG4P4RmPPix5pp7MatqSt9TnBOcVT+lBMGoVxRgUFeudQ==}
react@19.0.0:
resolution: {integrity: sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==}
engines: {node: '>=0.10.0'}
read-cache@1.0.0:
@ -1185,9 +1182,9 @@ snapshots:
tslib: 2.8.1
optional: true
'@heroicons/react@2.2.0(react@19.0.0-rc-f38c22b244-20240704)':
'@heroicons/react@2.2.0(react@19.0.0)':
dependencies:
react: 19.0.0-rc-f38c22b244-20240704
react: 19.0.0
'@img/sharp-darwin-arm64@0.33.5':
optionalDependencies:
@ -1358,7 +1355,7 @@ snapshots:
dependencies:
tslib: 2.8.1
'@tailwindcss/forms@0.5.9(tailwindcss@3.4.17)':
'@tailwindcss/forms@0.5.10(tailwindcss@3.4.17)':
dependencies:
mini-svg-data-uri: 1.4.4
tailwindcss: 3.4.17
@ -1373,19 +1370,16 @@ snapshots:
dependencies:
undici-types: 6.20.0
'@types/prop-types@15.7.12': {}
'@types/react-dom@18.3.5(@types/react@18.3.18)':
'@types/react-dom@18.3.5(@types/react@19.0.6)':
dependencies:
'@types/react': 18.3.18
'@types/react': 19.0.6
'@types/react-transition-group@4.4.12(@types/react@18.3.18)':
'@types/react-transition-group@4.4.12(@types/react@19.0.6)':
dependencies:
'@types/react': 18.3.18
'@types/react': 19.0.6
'@types/react@18.3.18':
'@types/react@19.0.6':
dependencies:
'@types/prop-types': 15.7.12
csstype: 3.1.3
abbrev@1.1.1: {}
@ -1740,13 +1734,13 @@ snapshots:
nanoid@3.3.7: {}
next-auth@5.0.0-beta.25(next@15.1.4(@playwright/test@1.49.1)(react-dom@19.0.0-rc-f38c22b244-20240704(react@19.0.0-rc-f38c22b244-20240704))(react@19.0.0-rc-f38c22b244-20240704))(react@19.0.0-rc-f38c22b244-20240704):
next-auth@5.0.0-beta.25(next@15.1.4(@playwright/test@1.49.1)(react-dom@19.0.0-rc-f38c22b244-20240704(react@19.0.0))(react@19.0.0))(react@19.0.0):
dependencies:
'@auth/core': 0.37.2
next: 15.1.4(@playwright/test@1.49.1)(react-dom@19.0.0-rc-f38c22b244-20240704(react@19.0.0-rc-f38c22b244-20240704))(react@19.0.0-rc-f38c22b244-20240704)
react: 19.0.0-rc-f38c22b244-20240704
next: 15.1.4(@playwright/test@1.49.1)(react-dom@19.0.0-rc-f38c22b244-20240704(react@19.0.0))(react@19.0.0)
react: 19.0.0
next@15.1.4(@playwright/test@1.49.1)(react-dom@19.0.0-rc-f38c22b244-20240704(react@19.0.0-rc-f38c22b244-20240704))(react@19.0.0-rc-f38c22b244-20240704):
next@15.1.4(@playwright/test@1.49.1)(react-dom@19.0.0-rc-f38c22b244-20240704(react@19.0.0))(react@19.0.0):
dependencies:
'@next/env': 15.1.4
'@swc/counter': 0.1.3
@ -1754,9 +1748,9 @@ snapshots:
busboy: 1.6.0
caniuse-lite: 1.0.30001651
postcss: 8.4.31
react: 19.0.0-rc-f38c22b244-20240704
react-dom: 19.0.0-rc-f38c22b244-20240704(react@19.0.0-rc-f38c22b244-20240704)
styled-jsx: 5.1.6(react@19.0.0-rc-f38c22b244-20240704)
react: 19.0.0
react-dom: 19.0.0-rc-f38c22b244-20240704(react@19.0.0)
styled-jsx: 5.1.6(react@19.0.0)
optionalDependencies:
'@next/swc-darwin-arm64': 15.1.4
'@next/swc-darwin-x64': 15.1.4
@ -1888,14 +1882,14 @@ snapshots:
primeicons@7.0.0: {}
primereact@10.9.1(@types/react@18.3.18)(react-dom@19.0.0-rc-f38c22b244-20240704(react@19.0.0-rc-f38c22b244-20240704))(react@19.0.0-rc-f38c22b244-20240704):
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):
dependencies:
'@types/react-transition-group': 4.4.12(@types/react@18.3.18)
react: 19.0.0-rc-f38c22b244-20240704
react-dom: 19.0.0-rc-f38c22b244-20240704(react@19.0.0-rc-f38c22b244-20240704)
react-transition-group: 4.4.5(react-dom@19.0.0-rc-f38c22b244-20240704(react@19.0.0-rc-f38c22b244-20240704))(react@19.0.0-rc-f38c22b244-20240704)
'@types/react-transition-group': 4.4.12(@types/react@19.0.6)
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': 18.3.18
'@types/react': 19.0.6
prop-types@15.8.1:
dependencies:
@ -1905,23 +1899,23 @@ snapshots:
queue-microtask@1.2.3: {}
react-dom@19.0.0-rc-f38c22b244-20240704(react@19.0.0-rc-f38c22b244-20240704):
react-dom@19.0.0-rc-f38c22b244-20240704(react@19.0.0):
dependencies:
react: 19.0.0-rc-f38c22b244-20240704
react: 19.0.0
scheduler: 0.25.0-rc-f38c22b244-20240704
react-is@16.13.1: {}
react-transition-group@4.4.5(react-dom@19.0.0-rc-f38c22b244-20240704(react@19.0.0-rc-f38c22b244-20240704))(react@19.0.0-rc-f38c22b244-20240704):
react-transition-group@4.4.5(react-dom@19.0.0-rc-f38c22b244-20240704(react@19.0.0))(react@19.0.0):
dependencies:
'@babel/runtime': 7.26.0
dom-helpers: 5.2.1
loose-envify: 1.4.0
prop-types: 15.8.1
react: 19.0.0-rc-f38c22b244-20240704
react-dom: 19.0.0-rc-f38c22b244-20240704(react@19.0.0-rc-f38c22b244-20240704)
react: 19.0.0
react-dom: 19.0.0-rc-f38c22b244-20240704(react@19.0.0)
react@19.0.0-rc-f38c22b244-20240704: {}
react@19.0.0: {}
read-cache@1.0.0:
dependencies:
@ -2038,10 +2032,10 @@ snapshots:
dependencies:
ansi-regex: 6.0.1
styled-jsx@5.1.6(react@19.0.0-rc-f38c22b244-20240704):
styled-jsx@5.1.6(react@19.0.0):
dependencies:
client-only: 0.0.1
react: 19.0.0-rc-f38c22b244-20240704
react: 19.0.0
sucrase@3.35.0:
dependencies:
@ -2119,9 +2113,9 @@ snapshots:
escalade: 3.1.2
picocolors: 1.1.1
use-debounce@10.0.4(react@19.0.0-rc-f38c22b244-20240704):
use-debounce@10.0.4(react@19.0.0):
dependencies:
react: 19.0.0-rc-f38c22b244-20240704
react: 19.0.0
util-deprecate@1.0.2: {}