Andrew Wallo 5 月之前
父節點
當前提交
4453d0edff

+ 3
- 1
app/Filament/Company/Clusters/Settings/Resources/DocumentDefaultResource.php 查看文件

145
                             ->hiddenLabel()
145
                             ->hiddenLabel()
146
                             ->visible(static fn (Get $get) => $get('template') === 'classic')
146
                             ->visible(static fn (Get $get) => $get('template') === 'classic')
147
                             ->view('filament.company.components.document-templates.classic'),
147
                             ->view('filament.company.components.document-templates.classic'),
148
-                    ])->columnSpan(2),
148
+                    ])->columnSpan([
149
+                        'lg' => 2,
150
+                    ]),
149
             ])->columns(3);
151
             ])->columns(3);
150
     }
152
     }
151
 
153
 

+ 0
- 5
app/Filament/Company/Resources/Sales/InvoiceResource/Pages/ViewInvoice.php 查看文件

28
         'refresh' => '$refresh',
28
         'refresh' => '$refresh',
29
     ];
29
     ];
30
 
30
 
31
-    public function getMaxContentWidth(): MaxWidth | string | null
32
-    {
33
-        return MaxWidth::SixExtraLarge;
34
-    }
35
-
36
     protected function getHeaderActions(): array
31
     protected function getHeaderActions(): array
37
     {
32
     {
38
         return [
33
         return [

+ 19
- 12
resources/views/components/company/document-template/container.blade.php 查看文件

2
     'preview' => false,
2
     'preview' => false,
3
 ])
3
 ])
4
 
4
 
5
-<div class="doc-template-container flex justify-center p-6">
6
-    <div
7
-        @class([
8
-            'doc-template-paper bg-[#ffffff] shadow-xl ring-1 ring-gray-950/5 dark:ring-white/10',
9
-            'w-full max-w-[820px] min-h-[1066px] max-h-[1200px] overflow-y-auto' => $preview === false,
10
-            'aspect-[1/1.3] overflow-hidden' => $preview === true,
11
-        ])
12
-        @style([
13
-            'scrollbar-width: thin;' => $preview === false,
14
-        ])
15
-    >
16
-        {{ $slot }}
5
+<div
6
+    @class([
7
+        'doc-template-container flex justify-center',
8
+        'scale-[0.85] origin-top' => $preview === true,
9
+    ])
10
+>
11
+    <div class="overflow-auto">
12
+        <div
13
+            @class([
14
+                'doc-template-paper bg-[#ffffff] shadow-xl ring-1 ring-gray-950/5 dark:ring-white/10',
15
+                'w-[51.25rem] h-[64rem]' => $preview === false,
16
+                'w-[48rem] h-[61.75rem]' => $preview === true,
17
+            ])
18
+            @style([
19
+                'scrollbar-width: thin;' => $preview === false,
20
+            ])
21
+        >
22
+            {{ $slot }}
23
+        </div>
17
     </div>
24
     </div>
18
 </div>
25
 </div>

+ 1
- 1
resources/views/components/company/document-template/footer.blade.php 查看文件

1
-<footer {{ $attributes->class(['doc-template-footer min-h-60']) }}>
1
+<footer {{ $attributes->class(['doc-template-footer']) }}>
2
     {{ $slot }}
2
     {{ $slot }}
3
 </footer>
3
 </footer>

+ 13
- 14
resources/views/filament/company/components/document-templates/modern.blade.php 查看文件

12
 </style>
12
 </style>
13
 
13
 
14
 <x-company.document-template.container class="modern-template-container" preview>
14
 <x-company.document-template.container class="modern-template-container" preview>
15
-
16
     <!-- Colored Header with Logo -->
15
     <!-- Colored Header with Logo -->
17
-    <x-company.document-template.header class="bg-gray-800 h-20">
16
+    <x-company.document-template.header class="bg-gray-800 h-24">
18
         <!-- Logo -->
17
         <!-- Logo -->
19
         <div class="w-2/3">
18
         <div class="w-2/3">
20
             @if($document->logo && $document->showLogo)
19
             @if($document->logo && $document->showLogo)
23
         </div>
22
         </div>
24
 
23
 
25
         <!-- Ribbon Container -->
24
         <!-- Ribbon Container -->
26
-        <div class="w-1/3 absolute right-0 top-0 p-3 h-28 flex flex-col justify-end rounded-bl-sm"
25
+        <div class="w-1/3 absolute right-0 top-0 p-3 h-32 flex flex-col justify-end rounded-bl-sm"
27
              style="background: {{ $document->accentColor }};">
26
              style="background: {{ $document->accentColor }};">
28
             @if($document->header)
27
             @if($document->header)
29
-                <h1 class="text-3xl font-bold text-white text-center uppercase">{{ $document->header }}</h1>
28
+                <h1 class="text-4xl font-bold text-white text-center uppercase">{{ $document->header }}</h1>
30
             @endif
29
             @endif
31
         </div>
30
         </div>
32
     </x-company.document-template.header>
31
     </x-company.document-template.header>
33
 
32
 
34
     <!-- Company Details -->
33
     <!-- Company Details -->
35
     <x-company.document-template.metadata class="modern-template-metadata space-y-8">
34
     <x-company.document-template.metadata class="modern-template-metadata space-y-8">
36
-        <div class="text-xs">
37
-            <h2 class="text-base font-semibold">{{ $document->company->name }}</h2>
35
+        <div class="text-sm">
36
+            <h2 class="text-lg font-semibold">{{ $document->company->name }}</h2>
38
             @if($formattedAddress = $document->company->getFormattedAddressHtml())
37
             @if($formattedAddress = $document->company->getFormattedAddressHtml())
39
                 {!! $formattedAddress !!}
38
                 {!! $formattedAddress !!}
40
             @endif
39
             @endif
42
 
41
 
43
         <div class="flex justify-between items-end">
42
         <div class="flex justify-between items-end">
44
             <!-- Billing Details -->
43
             <!-- Billing Details -->
45
-            <div class="text-xs">
44
+            <div class="text-sm">
46
                 <h3 class="text-gray-600 font-medium mb-1">BILL TO</h3>
45
                 <h3 class="text-gray-600 font-medium mb-1">BILL TO</h3>
47
-                <p class="text-xs font-bold"
46
+                <p class="text-sm font-bold"
48
                    style="color: {{ $document->accentColor }}">{{ $document->client->name }}</p>
47
                    style="color: {{ $document->accentColor }}">{{ $document->client->name }}</p>
49
 
48
 
50
                 @if($formattedAddress = $document->client->getFormattedAddressHtml())
49
                 @if($formattedAddress = $document->client->getFormattedAddressHtml())
52
                 @endif
51
                 @endif
53
             </div>
52
             </div>
54
 
53
 
55
-            <div class="text-xs">
54
+            <div class="text-sm">
56
                 <table class="min-w-full">
55
                 <table class="min-w-full">
57
                     <tbody>
56
                     <tbody>
58
                     <tr>
57
                     <tr>
82
     <!-- Line Items Table -->
81
     <!-- Line Items Table -->
83
     <x-company.document-template.line-items class="modern-template-line-items">
82
     <x-company.document-template.line-items class="modern-template-line-items">
84
         <table class="w-full text-left table-fixed">
83
         <table class="w-full text-left table-fixed">
85
-            <thead class="text-xs leading-relaxed">
84
+            <thead class="text-sm leading-relaxed">
86
             <tr class="text-gray-600">
85
             <tr class="text-gray-600">
87
                 <th class="text-left pl-6 w-[50%] py-4">{{ $document->columnLabel->items }}</th>
86
                 <th class="text-left pl-6 w-[50%] py-4">{{ $document->columnLabel->items }}</th>
88
                 <th class="text-center w-[10%] py-4">{{ $document->columnLabel->units }}</th>
87
                 <th class="text-center w-[10%] py-4">{{ $document->columnLabel->units }}</th>
90
                 <th class="text-right pr-6 w-[20%] py-4">{{ $document->columnLabel->amount }}</th>
89
                 <th class="text-right pr-6 w-[20%] py-4">{{ $document->columnLabel->amount }}</th>
91
             </tr>
90
             </tr>
92
             </thead>
91
             </thead>
93
-            <tbody class="text-xs border-y-2">
92
+            <tbody class="text-sm border-y-2">
94
             @foreach($document->lineItems as $index => $item)
93
             @foreach($document->lineItems as $index => $item)
95
                 <tr @class(['bg-gray-100' => $index % 2 === 0])>
94
                 <tr @class(['bg-gray-100' => $index % 2 === 0])>
96
                     <td class="text-left pl-6 font-semibold py-3">
95
                     <td class="text-left pl-6 font-semibold py-3">
105
                 </tr>
104
                 </tr>
106
             @endforeach
105
             @endforeach
107
             </tbody>
106
             </tbody>
108
-            <tfoot class="text-xs summary-section">
107
+            <tfoot class="text-sm summary-section">
109
             @if($document->subtotal)
108
             @if($document->subtotal)
110
                 <tr>
109
                 <tr>
111
                     <td class="pl-6 py-2" colspan="2"></td>
110
                     <td class="pl-6 py-2" colspan="2"></td>
149
 
148
 
150
     <!-- Footer Notes -->
149
     <!-- Footer Notes -->
151
     <x-company.document-template.footer class="modern-template-footer">
150
     <x-company.document-template.footer class="modern-template-footer">
152
-        <h4 class="font-semibold px-6 text-xs" style="color: {{ $document->accentColor }}">
151
+        <h4 class="font-semibold px-6 text-sm" style="color: {{ $document->accentColor }}">
153
             Terms & Conditions
152
             Terms & Conditions
154
         </h4>
153
         </h4>
155
         <span class="border-t-2 my-2 border-gray-300 block w-full"></span>
154
         <span class="border-t-2 my-2 border-gray-300 block w-full"></span>
156
-        <div class="flex justify-between space-x-4 px-6 text-xs">
155
+        <div class="flex justify-between space-x-4 px-6 text-sm">
157
             <p class="w-1/2 break-words line-clamp-4">{{ $document->terms }}</p>
156
             <p class="w-1/2 break-words line-clamp-4">{{ $document->terms }}</p>
158
             <p class="w-1/2 break-words line-clamp-4">{{ $document->footer }}</p>
157
             <p class="w-1/2 break-words line-clamp-4">{{ $document->footer }}</p>
159
         </div>
158
         </div>

Loading…
取消
儲存