wip
This commit is contained in:
1 parent
cb63c54c39
commit
2b8f9aa314
4 files changed
+5
-4
No files matched your search
@@ -40,6 +40,7 @@ public function rules(): array
|
||||
'customer_address' => ['required', 'string', 'max:255'],
|
||||
|
||||
'shipping_method' => ['required', 'string', 'max:255', Rule::in(array_keys(OrderShipping::values()))],
|
||||
'shipping_price' => ['nullable', 'numeric'],
|
||||
'payment_type_id' => ['required', Rule::in(array_keys(OrderPayment::values()))],
|
||||
|
||||
'notes' => ['nullable', 'string', 'max:255'],
|
||||
@@ -65,7 +66,7 @@ protected function passedValidation(): void
|
||||
'user_id' => auth()->id(),
|
||||
'notes' => $this->notes ?: null,
|
||||
'province_id' => $this->province_id ?: null,
|
||||
'shipping_price' => OrderShipping::priceFor($this->shipping_method),
|
||||
'shipping_price' => $this->shipping_price ?: OrderShipping::priceFor($this->shipping_method),
|
||||
'delivery_time' => $this->delivery_time ?: OrderShipping::MORNING,
|
||||
'delivery_at' => $this->delivery_at ?: date('Y-m-d'),
|
||||
'source' => $this->source ?: OS::MOBILE_APP,
|
||||
|
||||
Reference in new issue
Block a user