Skip to content

Instantly share code, notes, and snippets.

@solanoize
Created March 21, 2024 06:36
Show Gist options
  • Select an option

  • Save solanoize/54a891562ea6f5c7563ca4c308a9fd87 to your computer and use it in GitHub Desktop.

Select an option

Save solanoize/54a891562ea6f5c7563ca4c308a9fd87 to your computer and use it in GitHub Desktop.
Oncom
<div class="row mb-3" [formGroup]="orderForm">
<div class="col-md-12" formArrayName="items">
<div class="card">
<div class="card-body">
<div class="card-title">
<h4>Daftar Item</h4>
</div>
</div>
<table class="table table-hover table-stripped">
<thead>
<tr>
<th>Nomor</th>
<th>Nama</th>
<th>Satuan</th>
<th>Harga Jual</th>
<th>Stok</th>
<th>Qty</th>
<th class="text-end">Subtotal</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let item of getItemsForm().controls; let indexItem = index">
<td>
{{ getItemForm(indexItem).nomor }}
</td>
<td>
{{ getItemForm(indexItem).nama }}
</td>
<td>
{{ getItemForm(indexItem).satuan }}
</td>
<td>
{{ getItemForm(indexItem).hargaJual }}
</td>
<td>
{{ getItemForm(indexItem).stok }}
</td>
<td>
<input type="text" class="form-control" formControlName="qty" />
</td>
<td>
{{ getItemForm(indexItem).subtotal | currency:'IDR':'symbol-narrow' }}
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment