Skip to content

Commit bccef87

Browse files
committed
Add HKD,dele 1 button of customer list
1 parent be2928f commit bccef87

8 files changed

Lines changed: 17 additions & 25 deletions

File tree

prisma/schema.prisma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ datasource db {
1717
enum Currency {
1818
USD
1919
EUR
20-
CNY
20+
HKD
2121
GBP
2222
JPY
2323
}

src/app/invoices/new/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ interface LineItemInput {
1515
unitPrice: string;
1616
}
1717

18-
type Currency = 'USD' | 'EUR' | 'CNY' | 'GBP' | 'JPY';
18+
type Currency = 'USD' | 'EUR' | 'HKD' | 'GBP' | 'JPY';
1919

2020
export default function NewInvoicePage() {
2121
const router = useRouter();
@@ -473,7 +473,7 @@ export default function NewInvoicePage() {
473473
>
474474
<option value="USD">USD - 美元</option>
475475
<option value="EUR">EUR - 欧元</option>
476-
<option value="CNY">CNY - 人民币</option>
476+
<option value="HKD">HKD - 港币</option>
477477
<option value="GBP">GBP - 英镑</option>
478478
<option value="JPY">JPY - 日元</option>
479479
</select>

src/app/page.tsx

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -125,20 +125,12 @@ export default function HomePage() {
125125

126126
{/* Quick Actions */}
127127
<div className="text-center mb-16">
128-
<div className="flex justify-center gap-4">
129-
<Link
130-
href="/clients"
131-
className="px-8 py-4 bg-emerald-600 text-white rounded-xl hover:bg-emerald-500 transition-colors font-medium shadow-lg shadow-emerald-500/25"
132-
>
133-
添加客户
134-
</Link>
135-
<Link
136-
href="/invoices/new"
137-
className="px-8 py-4 bg-white/10 backdrop-blur text-white rounded-xl hover:bg-white/20 transition-colors font-medium border border-white/20"
138-
>
139-
创建发票
140-
</Link>
141-
</div>
128+
<Link
129+
href="/invoices/new"
130+
className="inline-block px-10 py-4 bg-emerald-600 text-white rounded-xl hover:bg-emerald-500 transition-colors font-medium shadow-lg shadow-emerald-500/25"
131+
>
132+
创建发票
133+
</Link>
142134
</div>
143135

144136
{/* Features List */}
@@ -153,7 +145,7 @@ export default function HomePage() {
153145
</div>
154146
<div>
155147
<h3 className="font-medium text-white">多币种支持</h3>
156-
<p className="text-sm text-gray-400">支持 USD、EUR、CNY、GBP、JPY</p>
148+
<p className="text-sm text-gray-400">支持 USD、EUR、HKD、GBP、JPY</p>
157149
</div>
158150
</div>
159151
<div className="flex gap-4 p-4 bg-white/5 backdrop-blur rounded-xl border border-white/10">

src/components/invoices/invoice-form.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ interface LineItemInput {
1414
interface InvoiceFormData {
1515
clientId: string;
1616
projectId?: string;
17-
currency: 'USD' | 'EUR' | 'CNY' | 'GBP' | 'JPY';
17+
currency: 'USD' | 'EUR' | 'HKD' | 'GBP' | 'JPY';
1818
issueDate: string;
1919
dueDate: string;
2020
lineItems: LineItemInput[];
@@ -201,7 +201,7 @@ export function InvoiceForm({ clients, projects, onSubmit, onCancel, isLoading }
201201
>
202202
<option value="USD">USD</option>
203203
<option value="EUR">EUR</option>
204-
<option value="CNY">CNY</option>
204+
<option value="HKD">HKD</option>
205205
<option value="GBP">GBP</option>
206206
<option value="JPY">JPY</option>
207207
</select>

src/components/invoices/invoice-preview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ interface InvoicePreviewProps {
3535
const currencySymbols: Record<string, string> = {
3636
USD: '$',
3737
EUR: '€',
38-
CNY: '¥',
38+
HKD: 'HK$',
3939
GBP: '£',
4040
JPY: '¥',
4141
};

src/server/trpc/routers/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const userSettingsInputSchema = z.object({
3636
businessName: z.string().nullable().optional(),
3737
logoUrl: z.string().url().nullable().optional(),
3838
country: z.string().nullable().optional(),
39-
defaultCurrency: z.enum(['USD', 'EUR', 'CNY', 'GBP', 'JPY'] as const).optional(),
39+
defaultCurrency: z.enum(['USD', 'EUR', 'HKD', 'GBP', 'JPY'] as const).optional(),
4040
estimatedTaxRate: z.number().min(0).max(1).optional(),
4141
});
4242

src/server/trpc/routers/invoice.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const createInvoiceSchema = z.object({
3535
clientId: z.string().optional(),
3636
newClient: newClientSchema.optional(),
3737
projectId: z.string().optional(),
38-
currency: z.enum(['USD', 'EUR', 'CNY', 'GBP', 'JPY']),
38+
currency: z.enum(['USD', 'EUR', 'HKD', 'GBP', 'JPY']),
3939
issueDate: z.coerce.date(),
4040
dueDate: z.coerce.date(),
4141
lineItems: z.array(lineItemSchema).min(1),

src/types/domain.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import Decimal from 'decimal.js';
22

33
// Currency types
4-
export type Currency = 'USD' | 'EUR' | 'CNY' | 'GBP' | 'JPY';
5-
export const CURRENCIES: Currency[] = ['USD', 'EUR', 'CNY', 'GBP', 'JPY'];
4+
export type Currency = 'USD' | 'EUR' | 'HKD' | 'GBP' | 'JPY';
5+
export const CURRENCIES: Currency[] = ['USD', 'EUR', 'HKD', 'GBP', 'JPY'];
66

77
// Blockchain types
88
export type Chain = 'arbitrum' | 'base' | 'polygon';

0 commit comments

Comments
 (0)