48 lines
1.6 KiB
Plaintext
48 lines
1.6 KiB
Plaintext
---
|
|
import DashboardLayout from '../../../layouts/DashboardLayout.astro';
|
|
import Icon from '../../../components/Icon.astro';
|
|
import { db } from '../../../db';
|
|
import { organizations, members } from '../../../db/schema';
|
|
import { eq } from 'drizzle-orm';
|
|
|
|
const user = Astro.locals.user;
|
|
if (!user) return Astro.redirect('/login');
|
|
---
|
|
|
|
<DashboardLayout title="Create Team - Chronus">
|
|
<div class="max-w-2xl mx-auto">
|
|
<div class="flex items-center gap-3 mb-6">
|
|
<a href="/dashboard" class="btn btn-ghost btn-xs">
|
|
<Icon name="arrow-left" class="w-4 h-4" />
|
|
</a>
|
|
<h1 class="text-2xl font-extrabold tracking-tight">Create New Team</h1>
|
|
</div>
|
|
|
|
<form method="POST" action="/api/organizations/create" class="card card-border bg-base-100">
|
|
<div class="card-body p-4">
|
|
<div class="alert alert-info mb-4">
|
|
<Icon name="information-circle" class="w-4 h-4" />
|
|
<span class="text-sm">Create a new team to manage separate projects and collaborators. You'll be the owner.</span>
|
|
</div>
|
|
|
|
<fieldset class="fieldset">
|
|
<legend class="fieldset-legend text-xs">Team Name</legend>
|
|
<input
|
|
type="text"
|
|
id="name"
|
|
name="name"
|
|
placeholder="Acme Corp"
|
|
class="input w-full"
|
|
required
|
|
/>
|
|
</fieldset>
|
|
|
|
<div class="flex justify-end gap-2 mt-4">
|
|
<a href="/dashboard" class="btn btn-ghost btn-sm">Cancel</a>
|
|
<button type="submit" class="btn btn-primary btn-sm">Create Team</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</DashboardLayout>
|