Upudate Module Special Codes
- Update Migration Add Description - Update Form Special Codes
This commit is contained in:
parent
4fa3b74d2d
commit
f05bf35df1
@ -72,6 +72,7 @@
|
||||
Column::make('DT_RowIndex')->title('No')->orderable(false)->searchable(false),
|
||||
Column::make('kode'),
|
||||
Column::make('name'),
|
||||
Column::make('description'),
|
||||
Column::computed('action')
|
||||
->exportable(false)
|
||||
->printable(false)
|
||||
|
@ -15,6 +15,7 @@
|
||||
$table->id();
|
||||
$table->string('kode', 2);
|
||||
$table->string('name');
|
||||
$table->string('description')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
|
@ -6,7 +6,8 @@
|
||||
{
|
||||
protected $fillable = [
|
||||
'kode',
|
||||
'name'
|
||||
'name',
|
||||
'description'
|
||||
];
|
||||
|
||||
public function document()
|
||||
|
@ -28,8 +28,9 @@
|
||||
: array
|
||||
{
|
||||
return [
|
||||
'kode' => 'required|string|max:2|min:2|unique:special_codes,kode',
|
||||
'name' => 'required|string|max:50'
|
||||
'kode' => 'required|string|max:2|min:2|unique:special_codes,kode',
|
||||
'name' => 'required|string|max:50',
|
||||
'description' => 'nullable|string|max:255'
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -28,8 +28,9 @@
|
||||
: array
|
||||
{
|
||||
return [
|
||||
'kode' => 'required|string|max:2|min:2|unique:special_codes,kode,' . $this->special_code->id,
|
||||
'name' => 'required|string|max:50'
|
||||
'kode' => 'required|string|max:2|min:2|unique:special_codes,kode,' . $this->special_code->id,
|
||||
'name' => 'required|string|max:50',
|
||||
'description' => 'nullable|string|max:255'
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -53,6 +53,18 @@
|
||||
</div>
|
||||
<!--end::Input group-->
|
||||
|
||||
<!--begin::Input group-->
|
||||
<div class="d-flex flex-column mb-8 fv-row">
|
||||
<!--begin::Label-->
|
||||
<label class="d-flex align-items-center fs-6 fw-semibold mb-2">
|
||||
<span class="required">Description</span>
|
||||
<span class="ms-1" data-bs-toggle="tooltip" title="Specify a target name for future usage and reference"></span>
|
||||
</label>
|
||||
<!--end::Label-->
|
||||
<textarea id="{{$route[0]}}_description" maxlength="255" rows="5" class="form-control form-control-solid" placeholder="Enter Special Code Description" name="description"></textarea>
|
||||
</div>
|
||||
<!--end::Input group-->
|
||||
|
||||
<!--begin::Actions-->
|
||||
<div class="text-center">
|
||||
<button type="reset" data-bs-dismiss="modal" class="btn btn-light me-3">Cancel</button>
|
||||
|
@ -70,6 +70,7 @@
|
||||
$('#{{$route[0]}}_id').val(response.id);
|
||||
$('#{{$route[0]}}_name').val(response.name);
|
||||
$('#{{$route[0]}}_kode').val(response.kode);
|
||||
$('#{{$route[0]}}_description').val(response.description);
|
||||
$('.form_{{$route[0]}}').attr('action', '{{ URL::to('/'.$route[0].'/') }}/' + response.id).append('<input type="hidden" name="_method" value="PUT">');
|
||||
$('#kt_modal_{{$route[0]}}').modal('show');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user