mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 08:12:15 +00:00
Create client frontend
This commit is contained in:
@@ -24,7 +24,7 @@ class StoreClientRequest extends FormRequest
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'avatar' => 'sometimes|file|nullable',
|
||||
'avatar' => 'sometimes|nullable',
|
||||
'name' => 'required|string',
|
||||
'email' => 'sometimes|email|nullable',
|
||||
'phone_number' => 'sometimes|string|nullable',
|
||||
@@ -33,8 +33,8 @@ class StoreClientRequest extends FormRequest
|
||||
'postal_code' => 'required|string',
|
||||
'country' => 'required|string',
|
||||
'ico' => 'required|string',
|
||||
'dic' => 'required|string',
|
||||
'ic_dph' => 'required|string',
|
||||
'dic' => 'required|string|nullable',
|
||||
'ic_dph' => 'sometimes|string|nullable',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ class OasisClientResource extends JsonResource
|
||||
'id' => $this->id,
|
||||
'name' => $this->name,
|
||||
'email' => $this->email,
|
||||
'avatar' => url('/assets/images/default-avatar.png'),
|
||||
'avatar' => $this->avatar,
|
||||
'totalNet' => format_to_currency($total_net, 'CZK'),
|
||||
'totalInvoices' => $total_invoices,
|
||||
'type' => 'client',
|
||||
|
||||
@@ -21,7 +21,8 @@ trait Oasis
|
||||
|
||||
public function clients()
|
||||
{
|
||||
return $this->hasMany(Client::class, 'user_id', 'id');
|
||||
return $this->hasMany(Client::class, 'user_id', 'id')
|
||||
->orderByDesc('created_at');
|
||||
}
|
||||
|
||||
public function regularInvoices()
|
||||
|
||||
Reference in New Issue
Block a user