hotfix-add subgroup customer

This commit is contained in:
phaichayon
2026-06-18 08:58:01 +07:00
parent 04a886ea26
commit 0650cf6297
38 changed files with 8674 additions and 687 deletions

View File

@@ -18,6 +18,11 @@ function Field({ label, value }: { label: string; value: string | null | undefin
export function QuotationDocumentPreview({ quotationId }: { quotationId: string }) {
const { data } = useSuspenseQuery(quotationDocumentPreviewOptions(quotationId));
const { documentData, template } = data.preview;
const topicGroups: Array<{ key: 'scope' | 'exclusion' | 'payment'; title: string }> = [
{ key: 'scope', title: 'Scope' },
{ key: 'exclusion', title: 'Exclusions' },
{ key: 'payment', title: 'Payment Terms' }
];
return (
<div className='space-y-6'>
@@ -137,12 +142,8 @@ export function QuotationDocumentPreview({ quotationId }: { quotationId: string
<CardDescription>Scope, exclusions, and payment terms from topic records.</CardDescription>
</CardHeader>
<CardContent className='space-y-6'>
{[
{ key: 'scope', title: 'Scope' },
{ key: 'exclusion', title: 'Exclusions' },
{ key: 'payment', title: 'Payment Terms' }
].map((group) => {
const entries = documentData.topics[group.key as keyof typeof documentData.topics];
{topicGroups.map((group) => {
const entries = documentData.topics[group.key];
return (
<div key={group.key} className='space-y-3'>
<div className='font-medium'>{group.title}</div>