fix: 部门列表空/职务无法启用 — fetchTree适配树形API响应, positions表加status/code/description字段
This commit is contained in:
@@ -21,7 +21,10 @@ class PositionController extends Controller
|
||||
{
|
||||
$data = $request->validate([
|
||||
'name' => 'required|string|max:50',
|
||||
'code' => 'nullable|string|max:50',
|
||||
'sort' => 'nullable|integer',
|
||||
'status' => 'in:0,1',
|
||||
'description' => 'nullable|string|max:255',
|
||||
]);
|
||||
|
||||
$data['store_id'] = auth()->user()->store_id;
|
||||
@@ -34,7 +37,10 @@ class PositionController extends Controller
|
||||
{
|
||||
$data = $request->validate([
|
||||
'name' => 'string|max:50',
|
||||
'code' => 'nullable|string|max:50',
|
||||
'sort' => 'nullable|integer',
|
||||
'status' => 'in:0,1',
|
||||
'description' => 'nullable|string|max:255',
|
||||
]);
|
||||
|
||||
$position->update($data);
|
||||
|
||||
Reference in New Issue
Block a user