Compare commits
6 Commits
49829a4573
...
c0b0edc00e
Author | SHA1 | Date | |
---|---|---|---|
c0b0edc00e | |||
9a104e8862 | |||
84fc9ee890 | |||
277be954b7 | |||
65a0b8c823 | |||
1285560f62 |
@@ -197,23 +197,23 @@ export function AdminTreatments() {
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="bg-white rounded-lg shadow-lg overflow-hidden">
|
||||
<table className="w-full">
|
||||
<div className="bg-white rounded-lg shadow-lg overflow-x-auto">
|
||||
<table className="w-full table-fixed">
|
||||
<thead className="bg-gray-50">
|
||||
<tr>
|
||||
<th className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
||||
<th className="w-2/5 px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
||||
Behandlung
|
||||
</th>
|
||||
<th className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
||||
<th className="w-1/6 px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
||||
Kategorie
|
||||
</th>
|
||||
<th className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
||||
<th className="w-1/12 px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
||||
Dauer
|
||||
</th>
|
||||
<th className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
||||
<th className="w-1/12 px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
||||
Preis
|
||||
</th>
|
||||
<th className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
||||
<th className="w-1/6 px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
||||
Aktionen
|
||||
</th>
|
||||
</tr>
|
||||
@@ -221,22 +221,26 @@ export function AdminTreatments() {
|
||||
<tbody className="bg-white divide-y divide-gray-200">
|
||||
{treatments?.map((treatment) => (
|
||||
<tr key={treatment.id}>
|
||||
<td className="px-6 py-4 whitespace-nowrap">
|
||||
<td className="px-6 py-4">
|
||||
<div>
|
||||
<div className="text-sm font-medium text-gray-900">{treatment.name}</div>
|
||||
<div className="text-sm text-gray-500">{treatment.description}</div>
|
||||
<div className="text-sm font-medium text-gray-900 truncate">{treatment.name}</div>
|
||||
<div className="text-sm text-gray-500 truncate" title={treatment.description}>
|
||||
{treatment.description.length > 50
|
||||
? `${treatment.description.substring(0, 50)}...`
|
||||
: treatment.description}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td className="px-6 py-4 whitespace-nowrap text-sm text-gray-900">
|
||||
<td className="px-6 py-4 text-sm text-gray-900 truncate">
|
||||
{treatment.category}
|
||||
</td>
|
||||
<td className="px-6 py-4 whitespace-nowrap text-sm text-gray-900">
|
||||
<td className="px-6 py-4 text-sm text-gray-900">
|
||||
{treatment.duration} Min
|
||||
</td>
|
||||
<td className="px-6 py-4 whitespace-nowrap text-sm text-gray-900">
|
||||
<td className="px-6 py-4 text-sm text-gray-900">
|
||||
{(treatment.price / 100).toFixed(2)} €
|
||||
</td>
|
||||
<td className="px-6 py-4 whitespace-nowrap text-sm font-medium space-x-2">
|
||||
<td className="px-6 py-4 text-sm font-medium space-x-2">
|
||||
<button
|
||||
onClick={() => handleEdit(treatment)}
|
||||
className="text-pink-600 hover:text-pink-900"
|
||||
|
@@ -14,11 +14,11 @@ export function clientEntry(c: Context<BlankEnv>) {
|
||||
// Read Vite manifest to get the correct file names
|
||||
const manifestPath = join(process.cwd(), 'dist', '.vite', 'manifest.json');
|
||||
const manifest = JSON.parse(readFileSync(manifestPath, 'utf-8'));
|
||||
const entry = manifest['src/client/main.tsx'];
|
||||
const entry = manifest['index.html'];
|
||||
if (entry) {
|
||||
jsFile = `/assets/${entry.file}`;
|
||||
jsFile = `/${entry.file}`;
|
||||
if (entry.css) {
|
||||
cssFiles = entry.css.map((css: string) => `/assets/${css}`);
|
||||
cssFiles = entry.css.map((css: string) => `/${css}`);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
|
@@ -7,7 +7,8 @@ export const rpcApp = new Hono();
|
||||
|
||||
const handler = new RPCHandler(router);
|
||||
|
||||
rpcApp.use("/*", async (c, next) => {
|
||||
rpcApp.all("/*", async (c) => {
|
||||
try {
|
||||
const { matched, response } = await handler.handle(c.req.raw, {
|
||||
prefix: "/rpc",
|
||||
});
|
||||
@@ -16,6 +17,9 @@ rpcApp.use("/*", async (c, next) => {
|
||||
return c.newResponse(response.body, response);
|
||||
}
|
||||
|
||||
await next();
|
||||
return;
|
||||
return c.json({ error: "Not found" }, 404);
|
||||
} catch (error) {
|
||||
console.error("RPC Handler error:", error);
|
||||
return c.json({ error: "Internal server error" }, 500);
|
||||
}
|
||||
});
|
||||
|
@@ -23,6 +23,7 @@ export default defineConfig(({ mode }) => {
|
||||
publicDir: "public",
|
||||
build: {
|
||||
outDir: "dist",
|
||||
manifest: true,
|
||||
rollupOptions: {
|
||||
input: "index.html"
|
||||
}
|
||||
|
Reference in New Issue
Block a user