patient
parent
90e76b0400
commit
3c07ea26c0
|
|
@ -76,7 +76,7 @@ class PatientController extends AdminController
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]),
|
]),
|
||||||
amisMake()->TextControl()->name('name')->label(__('patient.name'))->id('patient_name')->required(true),
|
amisMake()->TextControl()->name('name')->label(__('patient.name'))->id('patient_name')->required(),
|
||||||
amisMake()->SelectControl()->options(Gender::options())->name('sex')->label(__('patient.sex'))->id('patient_sex'),
|
amisMake()->SelectControl()->options(Gender::options())->name('sex')->label(__('patient.sex'))->id('patient_sex'),
|
||||||
amisMake()->TextControl()->name('phone')->label(__('patient.phone'))->id('patient_phone'),
|
amisMake()->TextControl()->name('phone')->label(__('patient.phone'))->id('patient_phone'),
|
||||||
amisMake()->TextControl()->name('address')->label(__('patient.address'))->id('patient_address'),
|
amisMake()->TextControl()->name('address')->label(__('patient.address'))->id('patient_address'),
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,11 @@ class UserController extends AdminController
|
||||||
|
|
||||||
public function getList(Request $request)
|
public function getList(Request $request)
|
||||||
{
|
{
|
||||||
$list = $this->service->listQuery()->get()->map(fn($item) => ['value' => $item->id, 'label' => $item->name . '-' . $item->phone]);
|
$list = $this->service->listQuery()->get()->map(function ($item) {
|
||||||
|
$item['value'] = $item->id;
|
||||||
|
$item['label'] = $item->name . '-' . $item->phone;
|
||||||
|
return $item;
|
||||||
|
});
|
||||||
|
|
||||||
return $this->response()->success($list);
|
return $this->response()->success($list);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue