add content status
This commit is contained in:
		@@ -13,6 +13,12 @@ class Content extends Component
 | 
			
		||||
     */
 | 
			
		||||
    public function render()
 | 
			
		||||
    {
 | 
			
		||||
        return view('components.documents.form.content');
 | 
			
		||||
        $status = 'draft';
 | 
			
		||||
 | 
			
		||||
        if (!empty($this->document)) {
 | 
			
		||||
            $status = $this->document->status;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        return view('components.documents.form.content', compact('status'));
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -93,14 +93,6 @@
 | 
			
		||||
            />
 | 
			
		||||
        @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', $status), ['id' => 'status', 'v-model' => 'form.status']) }}
 | 
			
		||||
        {{ Form::hidden('amount', old('amount', '0'), ['id' => 'amount', 'v-model' => 'form.amount']) }}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user