change mapping desc to varchar 250/textarea
This commit is contained in:
parent
a262c66059
commit
968938a100
@ -60,6 +60,11 @@ class AdminController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function dictMappings_index() {
|
public function dictMappings_index() {
|
||||||
return view('admin/dictMappings_index');
|
$db = \Config\Database::connect();
|
||||||
|
$sql = "select TESTCODE from DICT_TESTS where ENDVALIDDATE is null";
|
||||||
|
$query = $db->query($sql);
|
||||||
|
$results = $query->getResultArray();
|
||||||
|
$data['tests'] = $results;
|
||||||
|
return view('admin/dictMappings_index', $data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,15 @@
|
|||||||
<?= $this->extend('admin/layout/main.php') ?>
|
<?= $this->extend('admin/layout/main.php') ?>
|
||||||
|
|
||||||
<?= $this->section('content') ?>
|
<?= $this->section('content') ?>
|
||||||
|
<datalist id='liscode'>
|
||||||
|
<?php
|
||||||
|
echo "";
|
||||||
|
foreach($tests as $data) {
|
||||||
|
$testcode = $data['TESTCODE'];
|
||||||
|
echo "<option value='$testcode' />";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</datalist>
|
||||||
<div class="card border-0 m-1">
|
<div class="card border-0 m-1">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class='card-title'>Dictionary Mapping Order</div>
|
<div class='card-title'>Dictionary Mapping Order</div>
|
||||||
@ -37,8 +46,8 @@
|
|||||||
<table class="table table-sm table-borderless">
|
<table class="table table-sm table-borderless">
|
||||||
<input type='hidden' id='updateSingle' value='' />
|
<input type='hidden' id='updateSingle' value='' />
|
||||||
<tr class="align-middle"> <th>HIS Code</th> <th>:</th> <td><input class='form-control' type='text' id='hiscodeSingle'/></td> </tr>
|
<tr class="align-middle"> <th>HIS Code</th> <th>:</th> <td><input class='form-control' type='text' id='hiscodeSingle'/></td> </tr>
|
||||||
<tr class="align-middle"> <th>LIS Code</th> <th>:</th> <td><input class='form-control' type='text' id='liscodeSingle' oninput='this.value = this.value.toUpperCase();' /></td> </tr>
|
<tr class="align-middle"> <th>LIS Code</th> <th>:</th> <td><input list='liscode' class='form-control' type='text' id='liscodeSingle' oninput='this.value = this.value.toUpperCase();' /></td> </tr>
|
||||||
<tr class="align-middle"> <th>Desc.</th> <th>:</th> <td><input class='form-control' type='text' id='descsSingle'/></td> </tr>
|
<tr class="align-middle"> <th>Desc.</th> <th>:</th> <td><textarea class='form-control' id='descsSingle'></textarea></td> </tr>
|
||||||
</table>
|
</table>
|
||||||
<button class='btn btn-sm btn-primary' onclick='saveSingle()'>Save</button>
|
<button class='btn btn-sm btn-primary' onclick='saveSingle()'>Save</button>
|
||||||
<button class='btn btn-sm btn-secondary' data-bs-dismiss="modal">Cancel</button>
|
<button class='btn btn-sm btn-secondary' data-bs-dismiss="modal">Cancel</button>
|
||||||
@ -63,7 +72,7 @@
|
|||||||
<table class="table table-sm table-borderless">
|
<table class="table table-sm table-borderless">
|
||||||
<input type='hidden' id='updateProfile' value='' />
|
<input type='hidden' id='updateProfile' value='' />
|
||||||
<tr class="align-middle"> <th>HIS Code</th> <th>:</th> <td><input class='form-control' type='text' id='hiscodeProfile'/></td> </tr>
|
<tr class="align-middle"> <th>HIS Code</th> <th>:</th> <td><input class='form-control' type='text' id='hiscodeProfile'/></td> </tr>
|
||||||
<tr class="align-middle"> <th>Desc.</th> <th>:</th> <td><input class='form-control' type='text' id='descsProfile'/></td> </tr>
|
<tr class="align-middle"> <th>Desc.</th> <th>:</th> <td><textarea class='form-control' id='descsProfile'></textarea></td> </tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
@ -71,8 +80,8 @@
|
|||||||
<tr class="align-top">
|
<tr class="align-top">
|
||||||
<th>LIS Code</th> <th>:</th>
|
<th>LIS Code</th> <th>:</th>
|
||||||
<?php $j=1; ?>
|
<?php $j=1; ?>
|
||||||
<td> <?php for($i=1;$i<=11;$i++) { echo "<input class='mliscode$j' type='text' maxlength='5' size='7' oninput='this.value = this.value.toUpperCase();' /> <br />\n";$j++; } ?> </td>
|
<td> <?php for($i=1;$i<=11;$i++) { echo "<input class='mliscode$j' list='liscode' type='text' maxlength='5' size='7' oninput='this.value = this.value.toUpperCase();' /> <br />\n";$j++; } ?> </td>
|
||||||
<td> <?php for($i=1;$i<=11;$i++) { echo "<input class='mliscode$j' type='text' maxlength='5' size='7' oninput='this.value = this.value.toUpperCase();' /> <br />\n";$j++; } ?> </td>
|
<td> <?php for($i=1;$i<=11;$i++) { echo "<input class='mliscode$j' list='liscode' type='text' maxlength='5' size='7' oninput='this.value = this.value.toUpperCase();' /> <br />\n";$j++; } ?> </td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@ -106,12 +115,6 @@ function index() {
|
|||||||
descs = data[i].DESCS;
|
descs = data[i].DESCS;
|
||||||
editBtn = '';
|
editBtn = '';
|
||||||
if(data[i].LISCODE == null) { liscode = '-'; }
|
if(data[i].LISCODE == null) { liscode = '-'; }
|
||||||
/*
|
|
||||||
if(data[i].HISCODE != null) { text2 = data[i].TEXT2; }
|
|
||||||
if(data[i].MAPPINGTYPE != null) { unit = data[i].UNIT; }
|
|
||||||
if(data[i].MAPPINGID != null) { refftext = data[i].REFFTEXT; }
|
|
||||||
if(data[i].DESCS != null) { refftext = data[i].DESCS; }
|
|
||||||
*/
|
|
||||||
if(maptype == 'S') {
|
if(maptype == 'S') {
|
||||||
editBtn = '<button class="btn btn-sm btn-success" ' + ' onclick="editSingle(' + mapid+ ')">Edit' + '</button> ';
|
editBtn = '<button class="btn btn-sm btn-success" ' + ' onclick="editSingle(' + mapid+ ')">Edit' + '</button> ';
|
||||||
} else {
|
} else {
|
||||||
@ -204,7 +207,7 @@ function saveSingle() {
|
|||||||
method: "POST",
|
method: "POST",
|
||||||
data: data,
|
data: data,
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
$("#liscodeSingle").val('');
|
$(".liscodeSingle").val('');
|
||||||
$("#hiscodeSingle").val('');
|
$("#hiscodeSingle").val('');
|
||||||
$("#descsSingle").val('');
|
$("#descsSingle").val('');
|
||||||
$("#updateSingle").val('');
|
$("#updateSingle").val('');
|
||||||
|
|||||||
@ -49,7 +49,7 @@
|
|||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script src="<?=base_url();?>assets/jquery-3.6.0.min.js"></script>
|
<script src="<?=base_url();?>assets/jquery-3.7.1.min.js"></script>
|
||||||
<script src="<?=base_url();?>assets/js/bootstrap.bundle.min.js"></script>
|
<script src="<?=base_url();?>assets/js/bootstrap.bundle.min.js"></script>
|
||||||
<script src="<?=base_url();?>assets/datatables/datatables.min.js"></script>
|
<script src="<?=base_url();?>assets/datatables/datatables.min.js"></script>
|
||||||
<script src="<?=base_url();?>assets/js/scripts.js"></script>
|
<script src="<?=base_url();?>assets/js/scripts.js"></script>
|
||||||
|
|||||||
2
public/assets/jquery-3.7.1.min.js
vendored
Normal file
2
public/assets/jquery-3.7.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user