Browse Source

Select UOM from master UOM

pull/1/head
Wahyu Ramadhan 2 years ago
parent
commit
74cd893846
  1. 17
      edit-mode/function/function.js
  2. 2
      edit-mode/index.html

17
edit-mode/function/function.js

@ -147,6 +147,23 @@ function getSatuan(){
} }
satuanList.push(satuan) satuanList.push(satuan)
}); });
// Clear the select element before appending new options
$('#uom-req-material').empty();
// Append the new options to the select element
satuanList.forEach((option) => {
let newOption = new Option(option.label, option.label);
$('#uom-req-material').append(newOption);
});
// Initialize select2 on the select element
$('#uom-req-material').select2({
dropdownParent: materialModal,
placeholder: 'Pilih satuan',
allowClear: true
});
if(satuanList.length > 0){ if(satuanList.length > 0){
gantt.updateCollection("satuan", satuanList); gantt.updateCollection("satuan", satuanList);
gantt.refreshData(); gantt.refreshData();

2
edit-mode/index.html

@ -284,7 +284,7 @@
</div> </div>
<div class="col-md-1 form-group"> <div class="col-md-1 form-group">
<label>UOM</label> <label>UOM</label>
<input type="text" id="uom-req-material" name="uomReqMaterial" class="form-control form-control-sm" /> <select id="uom-req-material" name="uomReqMaterial" class="form-control form-control-sm"></select>
</div> </div>
<div class="col-md-2 form-group"> <div class="col-md-2 form-group">
<label>Expected arrival date</label> <label>Expected arrival date</label>

Loading…
Cancel
Save