Compare commits
2 Commits
45e2665997
...
5918ce050c
Author | SHA1 | Date | |
---|---|---|---|
5918ce050c | |||
a4edcbca07 |
20
.github/workflows/license_finder.yml
vendored
20
.github/workflows/license_finder.yml
vendored
@ -1,20 +0,0 @@
|
||||
name: Check usage of free licenses
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
jobs:
|
||||
build-static-assets:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: '3.3'
|
||||
- name: Install license finder gem
|
||||
run: gem install license_finder
|
||||
- name: Run license finder
|
||||
run: license_finder
|
@ -1,41 +1,38 @@
|
||||
'use client';
|
||||
'use client'
|
||||
|
||||
import clsx from 'clsx';
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { Guest } from '@/app/lib/definitions';
|
||||
import SkeletonRow from './skeleton-row';
|
||||
import { Suspense } from 'react';
|
||||
import clsx from 'clsx';
|
||||
|
||||
export default function guestsTable() {
|
||||
const [guests, setGuests] = useState<Array<Guest>>([]);
|
||||
export function TableHeader() {
|
||||
|
||||
function loadGuests() {
|
||||
fetch("http://localhost:3001/guests.json")
|
||||
.then((response) => response.json())
|
||||
.then((data) => {
|
||||
setGuests(data.data.map((record: any) => {
|
||||
return ({
|
||||
id: record.id,
|
||||
name: record.attributes.name,
|
||||
email: record.attributes.email,
|
||||
group_name: record.attributes.group_name,
|
||||
status: record.attributes.status
|
||||
});
|
||||
}));
|
||||
}, (error) => {
|
||||
return [];
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
export default async function guestsTable() {
|
||||
|
||||
|
||||
const handleInviteGuest = (e: React.MouseEvent<HTMLElement>) => {
|
||||
fetch("http://localhost:3001/guests/bulk-status-change.json", { method: 'POST', body: JSON.stringify({ status: "Invited", guest_ids: [e.currentTarget.getAttribute('data-guest-id')] }) })
|
||||
function handleInviteGuest() {
|
||||
fetch("http://localhost:3001/guests/123.json", {method: 'PATCH', body: JSON.stringify({guest: {status: 'Invited'}})})
|
||||
.then((response) => console.log(response.json()))
|
||||
.catch((error) => console.error(error));
|
||||
}
|
||||
|
||||
|
||||
|
||||
guests.length === 0 && loadGuests();
|
||||
let guests: Guest[] = await fetch("http://localhost:3001/guests.json")
|
||||
.then((response) => response.json())
|
||||
.then((data) => {
|
||||
return data.data.map((record: any) => {
|
||||
return ({
|
||||
id: record.id,
|
||||
name: record.attributes.name,
|
||||
email: record.attributes.email,
|
||||
group_name: record.attributes.group_name,
|
||||
status: record.attributes.status
|
||||
});
|
||||
});
|
||||
}, (error) => {
|
||||
return [];
|
||||
});
|
||||
|
||||
return (
|
||||
<div className="w-full relative overflow-x-auto shadow-md sm:rounded-lg">
|
||||
@ -91,7 +88,7 @@ export default function guestsTable() {
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
{guest.status === 'Considered' && (<button data-guest-id={guest.id} onClick={handleInviteGuest} className="bg-blue-300 hover:bg-blue-500 text-white py-1 px-2 rounded">
|
||||
{guest.status === 'Considered' && (<button onClick={handleInviteGuest} className="bg-blue-300 hover:bg-blue-500 text-white py-1 px-2 rounded">
|
||||
Invite
|
||||
</button>)}
|
||||
</td>
|
||||
|
@ -1,85 +0,0 @@
|
||||
---
|
||||
- - :permit
|
||||
- MIT
|
||||
- :who:
|
||||
:why:
|
||||
:versions: []
|
||||
:when: 2024-10-25 17:45:36.831184284 Z
|
||||
- - :permit
|
||||
- ISC
|
||||
- :who:
|
||||
:why:
|
||||
:versions: []
|
||||
:when: 2024-10-25 17:48:14.527140943 Z
|
||||
- - :permit
|
||||
- Apache 2.0
|
||||
- :who:
|
||||
:why:
|
||||
:versions: []
|
||||
:when: 2024-10-25 17:48:23.863998708 Z
|
||||
- - :permit
|
||||
- Simplified BSD
|
||||
- :who:
|
||||
:why:
|
||||
:versions: []
|
||||
:when: 2024-10-25 17:49:01.330574375 Z
|
||||
- - :permit
|
||||
- New BSD
|
||||
- :who:
|
||||
:why:
|
||||
:versions: []
|
||||
:when: 2024-10-25 17:49:53.995999923 Z
|
||||
- - :permit
|
||||
- LGPL-3.0-or-later
|
||||
- :who:
|
||||
:why:
|
||||
:versions: []
|
||||
:when: 2024-10-25 17:51:16.274818102 Z
|
||||
- - :permit
|
||||
- Python-2.0
|
||||
- :who:
|
||||
:why:
|
||||
:versions: []
|
||||
:when: 2024-10-25 17:51:32.610018037 Z
|
||||
- - :permit
|
||||
- BlueOak-1.0.0
|
||||
- :who:
|
||||
:why:
|
||||
:versions: []
|
||||
:when: 2024-10-25 17:52:28.568966565 Z
|
||||
- - :permit
|
||||
- BSD
|
||||
- :who:
|
||||
:why:
|
||||
:versions: []
|
||||
:when: 2024-10-25 17:52:37.235297087 Z
|
||||
- - :permit
|
||||
- The Unlicense
|
||||
- :who:
|
||||
:why:
|
||||
:versions: []
|
||||
:when: 2024-10-25 17:52:49.646463302 Z
|
||||
- - :permit
|
||||
- CC-BY-4.0
|
||||
- :who:
|
||||
:why:
|
||||
:versions: []
|
||||
:when: 2024-10-25 17:54:29.363007852 Z
|
||||
- - :permit
|
||||
- "(MIT AND Zlib)"
|
||||
- :who:
|
||||
:why:
|
||||
:versions: []
|
||||
:when: 2024-10-25 17:54:49.936741134 Z
|
||||
- - :permit
|
||||
- BSD Zero Clause License
|
||||
- :who:
|
||||
:why:
|
||||
:versions: []
|
||||
:when: 2024-10-25 17:55:31.968339009 Z
|
||||
- - :permit
|
||||
- Artistic-2.0
|
||||
- :who:
|
||||
:why:
|
||||
:versions: []
|
||||
:when: 2024-10-25 17:55:52.371898047 Z
|
14
package.json
14
package.json
@ -12,24 +12,24 @@
|
||||
"autoprefixer": "10.4.20",
|
||||
"bcrypt": "^5.1.1",
|
||||
"clsx": "^2.1.1",
|
||||
"next": "15.0.1",
|
||||
"next-auth": "5.0.0-beta.25",
|
||||
"postcss": "8.4.47",
|
||||
"next": "15.0.0-rc.0",
|
||||
"next-auth": "5.0.0-beta.20",
|
||||
"postcss": "8.4.43",
|
||||
"primeicons": "^7.0.0",
|
||||
"primereact": "^10.8.2",
|
||||
"react": "19.0.0-rc-f38c22b244-20240704",
|
||||
"react-dom": "19.0.0-rc-f38c22b244-20240704",
|
||||
"tailwindcss": "3.4.14",
|
||||
"typescript": "5.6.3",
|
||||
"tailwindcss": "3.4.10",
|
||||
"typescript": "5.5.4",
|
||||
"use-debounce": "^10.0.1",
|
||||
"zod": "^3.23.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.46.0",
|
||||
"@types/bcrypt": "^5.0.2",
|
||||
"@types/node": "22.7.9",
|
||||
"@types/node": "22.5.4",
|
||||
"@types/react": "18.3.5",
|
||||
"@types/react-dom": "18.3.1"
|
||||
"@types/react-dom": "18.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.12.0"
|
||||
|
565
pnpm-lock.yaml
generated
565
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user