Update new.astro
All checks were successful
Docker Deploy / build-and-push (push) Successful in 4m9s
All checks were successful
Docker Deploy / build-and-push (push) Successful in 4m9s
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import DashboardLayout from '../../../layouts/DashboardLayout.astro';
|
||||
import { Icon } from 'astro-icon/components';
|
||||
import { db } from '../../../db';
|
||||
import { clients, members, invoices } from '../../../db/schema';
|
||||
import { clients, members, invoices, organizations } from '../../../db/schema';
|
||||
import { eq, desc, and } from 'drizzle-orm';
|
||||
|
||||
const user = Astro.locals.user;
|
||||
@@ -25,6 +25,11 @@ const userMembership = currentTeamId
|
||||
|
||||
const currentTeamIdResolved = userMembership.organizationId;
|
||||
|
||||
const currentOrganization = await db.select()
|
||||
.from(organizations)
|
||||
.where(eq(organizations.id, currentTeamIdResolved))
|
||||
.get();
|
||||
|
||||
// Fetch clients for dropdown
|
||||
const teamClients = await db.select()
|
||||
.from(clients)
|
||||
@@ -190,11 +195,11 @@ const defaultDueDate = nextMonth.toISOString().split('T')[0];
|
||||
Currency
|
||||
</label>
|
||||
<select id="invoice-currency" name="currency" class="select select-bordered w-full">
|
||||
<option value="USD">USD ($)</option>
|
||||
<option value="EUR">EUR (€)</option>
|
||||
<option value="GBP">GBP (£)</option>
|
||||
<option value="CAD">CAD ($)</option>
|
||||
<option value="AUD">AUD ($)</option>
|
||||
<option value="USD" selected={currentOrganization?.defaultCurrency === 'USD'}>USD ($)</option>
|
||||
<option value="EUR" selected={currentOrganization?.defaultCurrency === 'EUR'}>EUR (€)</option>
|
||||
<option value="GBP" selected={currentOrganization?.defaultCurrency === 'GBP'}>GBP (£)</option>
|
||||
<option value="CAD" selected={currentOrganization?.defaultCurrency === 'CAD'}>CAD ($)</option>
|
||||
<option value="AUD" selected={currentOrganization?.defaultCurrency === 'AUD'}>AUD ($)</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user