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