Show tarikh_lelong when select batch component
This commit is contained in:
@@ -1433,7 +1433,12 @@ class LelongMobileController extends Controller
|
||||
|
||||
public function listLelong()
|
||||
{
|
||||
$lelong_all = Lelong::select('id')->get();
|
||||
$lelong_all = Lelong::select('id', 'tarikh_lelong')->get();
|
||||
foreach($lelong_all as $index => $lelong)
|
||||
{
|
||||
$date_convert = strtotime($lelong->tarikh_lelong);
|
||||
$lelong_all[$index]['tarikh_lelong'] = date("d-m-Y", $date_convert);
|
||||
}
|
||||
return response()->json($lelong_all);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<label>Pilih Batch Lelong</label>
|
||||
<select class="custom-select" @change="pilihBatchLelong($event)">
|
||||
<option selected>Batch Lelong</option>
|
||||
<option v-for="val in listLelong" :key="val" v-bind:value="val.id">{{ val.id }}</option>
|
||||
<option v-for="val in listLelong" :key="val" v-bind:value="val.id">{{ val.id }}, ({{ val.tarikh_lelong }})</option>
|
||||
</select>
|
||||
<div class="mt-3">
|
||||
<SelectCawangan v-if="pilihLelong != 'Batch Lelong'" v-bind:key="componentKey" v-bind:selectedLelong="pilihLelong" />
|
||||
|
||||
Reference in New Issue
Block a user