chore: refresh types and formatting
This commit is contained in:
@@ -16,18 +16,6 @@
|
|||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
workspace: string;
|
workspace: string;
|
||||||
addressLine1?: string | null;
|
|
||||||
addressLine2?: string | null;
|
|
||||||
city?: string | null;
|
|
||||||
region?: string | null;
|
|
||||||
postcode?: string | null;
|
|
||||||
country?: string | null;
|
|
||||||
bankName?: string | null;
|
|
||||||
bankAccountName?: string | null;
|
|
||||||
bankAccountNumber?: string | null;
|
|
||||||
bankSortCode?: string | null;
|
|
||||||
bankIban?: string | null;
|
|
||||||
bankSwift?: string | null;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let {
|
let {
|
||||||
|
|||||||
@@ -1,19 +1,21 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import HomeIcon from '@lucide/svelte/icons/home';
|
import HomeIcon from '@lucide/svelte/icons/home';
|
||||||
import RefreshCwIcon from '@lucide/svelte/icons/refresh-cw';
|
import RefreshCwIcon from '@lucide/svelte/icons/refresh-cw';
|
||||||
import { resolve } from '$app/paths';
|
|
||||||
import { page } from '$app/state';
|
import { page } from '$app/state';
|
||||||
import { Button } from '$lib/components/ui/button/index.js';
|
import { Button } from '$lib/components/ui/button/index.js';
|
||||||
|
|
||||||
const status = $derived(page.status);
|
const status = $derived(page.status);
|
||||||
const message = $derived(page.error?.message ?? 'Something went wrong.');
|
const message = $derived(page.error?.message ?? 'Something went wrong.');
|
||||||
const currentPath = $derived(page.url.pathname);
|
|
||||||
const title = $derived(status === 404 ? message : 'Something went wrong');
|
const title = $derived(status === 404 ? message : 'Something went wrong');
|
||||||
const description = $derived(
|
const description = $derived(
|
||||||
status === 404
|
status === 404
|
||||||
? 'This item may be archived, deleted, or unavailable in the active organization.'
|
? 'This item may be archived, deleted, or unavailable in the active organization.'
|
||||||
: 'The dashboard could not finish loading this view.'
|
: 'The dashboard could not finish loading this view.'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
function retry() {
|
||||||
|
window.location.reload();
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
@@ -29,11 +31,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex justify-center gap-2">
|
<div class="flex justify-center gap-2">
|
||||||
<Button href={resolve('/dashboard')} variant="outline">
|
<Button href="/dashboard" variant="outline">
|
||||||
<HomeIcon data-icon="inline-start" />
|
<HomeIcon data-icon="inline-start" />
|
||||||
Dashboard
|
Dashboard
|
||||||
</Button>
|
</Button>
|
||||||
<Button href={currentPath}>
|
<Button onclick={retry}>
|
||||||
<RefreshCwIcon data-icon="inline-start" />
|
<RefreshCwIcon data-icon="inline-start" />
|
||||||
Retry
|
Retry
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -46,7 +46,6 @@
|
|||||||
dueDate: string;
|
dueDate: string;
|
||||||
lines: BillingLine[];
|
lines: BillingLine[];
|
||||||
clients: BillingClient[];
|
clients: BillingClient[];
|
||||||
totalGbp: number;
|
|
||||||
};
|
};
|
||||||
formatMoney: (value: unknown) => string;
|
formatMoney: (value: unknown) => string;
|
||||||
formatDate: (value: unknown) => string;
|
formatDate: (value: unknown) => string;
|
||||||
|
|||||||
@@ -35,7 +35,13 @@
|
|||||||
<Dialog.Description>Update this contract record.</Dialog.Description>
|
<Dialog.Description>Update this contract record.</Dialog.Description>
|
||||||
</Dialog.Header>
|
</Dialog.Header>
|
||||||
{#if editingRecord}
|
{#if editingRecord}
|
||||||
<form id="edit-contract-form" method="POST" action="?/edit" class="grid gap-2" use:enhanceEdit>
|
<form
|
||||||
|
id="edit-contract-form"
|
||||||
|
method="POST"
|
||||||
|
action="?/edit"
|
||||||
|
class="grid gap-2"
|
||||||
|
use:enhanceEdit
|
||||||
|
>
|
||||||
<input type="hidden" name="id" value={$editData.id} />
|
<input type="hidden" name="id" value={$editData.id} />
|
||||||
<ContractFormFields form={editForm} data={editData} {options} prefix="edit" />
|
<ContractFormFields form={editForm} data={editData} {options} prefix="edit" />
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
Vendored
+4
-1
@@ -1,8 +1,11 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
// Generated by Wrangler by running `wrangler types` (hash: 4f9fe9ddb2ea1e2c41e1be5910da8551)
|
// Generated by Wrangler by running `wrangler types` (hash: 61c64c9cd1c2465ff3a92bc5ac82d57d)
|
||||||
// Runtime types generated with workerd@1.20260521.1 2026-05-23 nodejs_als
|
// Runtime types generated with workerd@1.20260521.1 2026-05-23 nodejs_als
|
||||||
interface __BaseEnv_Env {
|
interface __BaseEnv_Env {
|
||||||
ASSETS: Fetcher;
|
ASSETS: Fetcher;
|
||||||
|
DATABASE_URL: string;
|
||||||
|
ORIGIN: string;
|
||||||
|
BETTER_AUTH_SECRET: string;
|
||||||
}
|
}
|
||||||
declare namespace Cloudflare {
|
declare namespace Cloudflare {
|
||||||
interface Env extends __BaseEnv_Env {}
|
interface Env extends __BaseEnv_Env {}
|
||||||
|
|||||||
Reference in New Issue
Block a user