feat(admin): IP pool allocation, billing exports, service attachments
- IP pool: sheet import (xlsx/csv) matched by address, bulk allocate/revoke with notification email (ip_allocated/ip_revoked), ip_pool_logs history. - Orders/invoices: Excel export on branded template (BrandedReportWriter), shared billing filters, order item service info in list responses. - Web design quote Excel export; activity log export. - Service attachments with copy-to-invoice; deployment invoice attachments. - Customer email attachments stored on disk and attached by path. - Admin password change endpoint; user.fullname backfill migration; orders.user_id backfill from logs. - Disable deploy workflow until CI/CD is set up. - Ignore stored customer email and service attachment uploads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
ea5697cb81
commit
46aa138eec
@@ -21,8 +21,7 @@ class OrderResource extends JsonResource
|
||||
]),
|
||||
'user' => $this->whenLoaded('user', fn() => [
|
||||
'id' => $this->user->id,
|
||||
'firstname' => $this->user->firstname,
|
||||
'lastname' => $this->user->lastname,
|
||||
'fullname' => $this->user->fullname,
|
||||
'email' => $this->user->email,
|
||||
]),
|
||||
'payment' => $this->whenLoaded('payment', fn() => [
|
||||
@@ -117,34 +116,19 @@ class OrderResource extends JsonResource
|
||||
'status' => $vm->status,
|
||||
'next_due_date' => $vm->next_due_date,
|
||||
])),
|
||||
'order_items' => $this->whenLoaded('orderItems', fn() => $this->orderItems->map(function ($item) {
|
||||
return [
|
||||
'id' => $item->id,
|
||||
'product' => $item->product ? [
|
||||
'id' => $item->product->id,
|
||||
'name' => $item->product->name,
|
||||
'product_type' => $item->product->product_type,
|
||||
] : null,
|
||||
'os' => $item->os ? [
|
||||
'id' => $item->os->id,
|
||||
'name' => $item->os->name,
|
||||
'version' => $item->os->version,
|
||||
] : null,
|
||||
'billing_cycle' => $item->billing_cycle,
|
||||
'months' => $item->months,
|
||||
'expiry_date' => $item->expiry_date,
|
||||
'quantity' => $item->quantity,
|
||||
'server_name' => $item->server_name,
|
||||
'price' => $item->price,
|
||||
'service' => $item->service ? [
|
||||
'id' => $item->service->id,
|
||||
'vm_id' => $item->service->vm_id,
|
||||
'status' => $item->service->status,
|
||||
'started_at' => $item->service->started_at,
|
||||
'expires_at' => $item->service->expires_at,
|
||||
] : null,
|
||||
];
|
||||
})),
|
||||
'order_items' => $this->whenLoaded('orderItems', fn() => $this->orderItems->map(fn($item) => [
|
||||
...OrderItemServiceResource::make($item)->resolve(),
|
||||
'os' => $item->os ? [
|
||||
'id' => $item->os->id,
|
||||
'name' => $item->os->name,
|
||||
'version' => $item->os->version,
|
||||
] : null,
|
||||
'billing_cycle' => $item->billing_cycle,
|
||||
'months' => $item->months,
|
||||
'expiry_date' => $item->expiry_date,
|
||||
'quantity' => $item->quantity,
|
||||
'price' => $item->price,
|
||||
])),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user