Merge pull request '20250423' (#161) from development into main
Reviewed-on: #161
This commit is contained in:
commit
aede28607d
@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
**2025-04-20**
|
||||
**2025-04-23**
|
||||
- Fixed #128 - Implement a confirm leave dialog on unsaved changes
|
||||
- Fixed #158 - Add customer PO of first order to invoice filename
|
||||
- Fixed #159 - Product service line breaks should be preserved on PDFs
|
||||
- Fixed #131 - Add Service Type background color on PDFs
|
||||
- Fixed #155 - Invoice internal ID should be 5 digits
|
||||
- Fixed #154 - Logo name doesn't get replicated
|
||||
- Fixed #153 - Improved product service form again
|
||||
|
@ -34,4 +34,15 @@ public function getColor(): string
|
||||
self::MISC => 'misc',
|
||||
};
|
||||
}
|
||||
|
||||
public function getColorHex(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::EMB => '#9900BB',
|
||||
self::SCP => '#0088FF',
|
||||
self::DTG => '#57cded',
|
||||
self::VINYL => '#22AA22',
|
||||
self::MISC => '#0000FF',
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -347,6 +347,17 @@ public static function table(Table $table): Table
|
||||
->sortable(),
|
||||
|
||||
TextColumn::make('customer.company_name')
|
||||
->limit(25)
|
||||
->tooltip(function (TextColumn $column): ?string {
|
||||
$state = $column->getState();
|
||||
|
||||
if (strlen($state) <= $column->getCharacterLimit()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Only render the tooltip if the column content exceeds the length limit.
|
||||
return $state;
|
||||
})
|
||||
->searchable()
|
||||
->sortable(),
|
||||
|
||||
|
@ -77,19 +77,20 @@ public static function table(Table $table): Table
|
||||
TextColumn::make('date_received')
|
||||
->sortable()
|
||||
->searchable(),
|
||||
|
||||
TextColumn::make('order.customer.company_name')
|
||||
->sortable()
|
||||
->searchable(),
|
||||
|
||||
TextColumn::make('order.customer_po')
|
||||
->url(fn ($record) => OrderResource::getUrl('edit', ['record' => $record->id]))
|
||||
->weight('bold')
|
||||
->color('code')
|
||||
->sortable()
|
||||
->searchable(),
|
||||
|
||||
TextColumn::make('contents')
|
||||
->extraHeaderAttributes(['class' => 'w-full']),
|
||||
// TextColumn::make('amount')
|
||||
// ->label('Quantity'),
|
||||
TextColumn::make('order.customer.company_name')
|
||||
->sortable()
|
||||
->searchable(),
|
||||
])
|
||||
->defaultSort('date_received', 'desc')
|
||||
->filters([
|
||||
|
@ -11,7 +11,12 @@ class InvoiceController extends Controller
|
||||
public function pdf(int $id)
|
||||
{
|
||||
$invoice = Invoice::find($id);
|
||||
$url = strtolower($invoice->internal_id.'_'.$invoice->customer->company_name.'.pdf');
|
||||
|
||||
$firstOrderPo = $invoice->orders()->first()->customer_po ?? '';
|
||||
$firstOrderPo = preg_replace('/[\\\\\/:*?"<>|]/', '', $firstOrderPo); // Remove invalid characters
|
||||
$firstOrderPo = str_replace(' ', '-', $firstOrderPo);
|
||||
|
||||
$url = strtolower($invoice->internal_id.'-'.$invoice->customer->company_name.'-'.$firstOrderPo.'.pdf');
|
||||
|
||||
Pdf::view('pdf.invoice', ['invoice' => $invoice])
|
||||
->withBrowsershot(function (Browsershot $browsershot) {
|
||||
|
@ -68,6 +68,7 @@ public function panel(Panel $panel): Panel
|
||||
NavigationGroup::make('Reports'),
|
||||
NavigationGroup::make('Settings'),
|
||||
])
|
||||
->plugin(ResourceLockPlugin::make());
|
||||
->plugin(ResourceLockPlugin::make())
|
||||
->unsavedChangesAlerts();
|
||||
}
|
||||
}
|
||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "order_system",
|
||||
"name": "topnotch_website",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
|
@ -13,8 +13,8 @@
|
||||
</div>
|
||||
|
||||
<div class="col-4 text-center">
|
||||
<div class="bg-info text-white flex-nowrap">
|
||||
<div class="fs-5 fw-bold">{{$order->order_type->getLabel()}}</div>
|
||||
<div class="text-white flex-nowrap" style="background-color: {{$order->order_type->getColorHex()}}">
|
||||
<div class="fs-5 fw-bold">{{$order->order_type->name}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -214,7 +214,7 @@
|
||||
</div>
|
||||
<br>
|
||||
<div class="text-uppercase" style="color: #d63384;">
|
||||
{{$service->notes ?? ''}}
|
||||
{!! nl2br(e($service->notes)) !!}
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user