From 4de624594d4581bf7ac3831d42440693b9d95666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Tue, 26 Jan 2021 11:40:43 +0300 Subject: [PATCH] document edit status fixed.. --- .../views/components/documents/form/content.blade.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/resources/views/components/documents/form/content.blade.php b/resources/views/components/documents/form/content.blade.php index 60de7f01c..079b45e48 100644 --- a/resources/views/components/documents/form/content.blade.php +++ b/resources/views/components/documents/form/content.blade.php @@ -93,7 +93,15 @@ /> @endif + @php + $status = 'draft'; + + if (!empty($document)) { + $status = $document->status; + } + @endphp + {{ Form::hidden('type', old('type', $type), ['id' => 'type', 'v-model' => 'form.type']) }} - {{ Form::hidden('status', old('status', 'draft'), ['id' => 'status', 'v-model' => 'form.status']) }} + {{ Form::hidden('status', old('status', $status), ['id' => 'status', 'v-model' => 'form.status']) }} {{ Form::hidden('amount', old('amount', '0'), ['id' => 'amount', 'v-model' => 'form.amount']) }} {!! Form::close() !!}