close #2260 Fixed: Categories in New Payment window initially shown by id instead of name.

This commit is contained in:
Cüneyt Şentürk
2021-10-06 15:24:12 +03:00
parent 3738c64430
commit 11346d899f
3 changed files with 11 additions and 3 deletions

View File

@ -22,6 +22,10 @@ class Advanced extends Component
$categories = Category::enabled()->orderBy('name')->take(setting('default.select_limit'))->pluck('name', 'id');
}
if (!empty($this->document) && ($this->document->category && !$categories->has($this->document->category_id))) {
$categories->put($this->document->category->id, $this->document->category->name);
}
$recurring_class = 'col-sm-6 col-md-6 col-lg-6 col-xl-6';
$more_class = 'col-sm-6 col-md-6 col-lg-6 col-xl-6';
$more_form_class = 'col-md-12';

View File

@ -18,6 +18,6 @@ class Company extends Component
$inputNameType = config('type.' . $this->type . '.route.parameter');
return view('components.documents.form.company', compact('company','inputNameType'));
return view('components.documents.form.company', compact('company', 'inputNameType'));
}
}