Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 3

<div wire:ignore.

self class="modal fade" id="edit"

aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteStudentModalLabel"> ‫تعديل اذن‬
‫<صرف‬/h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"
aria-label="Close"></button>
</div>
<form class="form-horizontal" wire:submit.prevent="update()">

<div class="card-body">
{{-- row 1 --}}
<div class="row">
<div class="col-sm-12 col-md-6 col-lg-4 mt-3 form-
floating">
<input type="date" class="form-control"
wire:model="date" value="{{ date('Y-m-d') }}"
placeholder="‫ "التاريخ‬name="date" required>
<label for="date" class="col-form-label info">‫التاريخ‬
<span
class="text-danger">*</span></label>
</div>
<div class="col-sm-12 col-md-6 col-lg-4 mt-3 form-
floating">

<select class="form-control store "


wire:model="new_store_id" name="store_id"
id="store_id">
<option value="" hidden>‫<اختر مخزن‬/option>
@foreach ($stores as $store)
<option value="{{$store->id}}" {{$store-
>new_store_id == $store->id ? 'selected':''}}>
{{$store->name}}
</option>
@endforeach
</select>
<label for="date" class="col-form-label info">‫المخزن‬
<span
class="text-danger">*</span></label>
</div>
<div class="col-sm-12 col-md-6 col-lg-4 mt-3 form-
floating">
<textarea class="form-control " rows="3"
wire:model="nottes" id="note"
placeholder="‫ مالحظات‬..."
name="note"></textarea>
<label for="note" class=" col-form-label info">‫مالحظات‬
</label>
</div>
</div>
{{-- row 2 --}}
<table id="example2"
class="table table-bordered table-striped dataTable dtr-
inline mt-2"
aria-describedby="example1_info">
<thead>
<tr>
<th>‫<اسم الصنف‬/th>
<th>‫<الكمية الحالية‬/th>
<th>‫<الكمية‬/th>
<th>‫<العملية‬/th>
</tr>
</thead>
<tbody id="tbody">

@foreach(\App\Models\
ExportItem::where('total_export_item_id',$this->export_id)->get() as $i=>
$itemStoreEdit)

{{-- @foreach($newInputs as $key =>$newInput)--}}


<tr>

{{-- {{$itemStoreEdit->total_export_item_id}}--}}
{{($this->newInputs[$i]['item_idd'])}}
<td style="width: 30%;" >
<div class="row m-{{$i}}">
<select class="form-control js-example-
basic-single" wire:model="newInputs.{{$i}}.item_idd" name="item_idd">

@foreach($newItems as $export)
<option value="{{$export->id }}"
@if($export->id == $this->newInputs[$i]['item_idd']) selected @endif>{{$export-
>name}}</option>
@endforeach
</select>
</div>
</td>
<td>

<input type="number" class="form-control "


wire:key="{{$i}}"
wire:change="newInputs({{ $i }},
$event.target.value)"
wire:model="newInputs.
{{$i}}.new_current_amount"
:value="newInputs.{{$i}}"
step="any" placeholder=" ‫"الكمية الحالية‬
readonly >
</td>
<td>
<input type="number" class="form-control
amountt"
wire:model="newInputs.{{$i}}.amountt"
step="any" placeholder="‫>"الكمية‬
</td>

<td>
<div class="d-flex justify-content-center">
<button type="button" class="btn bg-success
hint--right"
wire:click.prevent="newRow()"
aria-label="‫ "اضف صف جديد‬id="add">
<i class="fas fa-plus-square"></i>
</button>
@if($i)
<button type="button" class="btn bg-
danger hint--right"

wire:click.prevent="removeRow({{$key}})"
aria-label="‫"حذف صف جديد‬
id="add">
<i class="fas fa-trash"></i>
</button>
@endif
</div>
</td>

</tr>

@endforeach
{{-- @endforeach--}}

</tbody>
</table>
@error('inputs.*.amount')<span class="text-danger
alert">{{$message}}</span> @enderror
</div>
<!-- /.card-body -->
<div class="card-footer">
<button type="submit" class="btn bg-success-2 btn-sm mr-3
hint--right" aria-label="‫>"حفظ‬
<i class="fa fa-check" aria-hidden="true"></i>
</button>
<button class="btn btn-outline-secondary btn-sm hint--right"
aria-label="‫"حذف البيانات‬
type="reset">
<i class="fas fa-undo"></i>
</button>
</div>
<!-- /.card-footer -->
</form>
</div>
</div>

</div>

You might also like